Spontaneous closure of the grid cell editor
ioprst <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Hey. In wxpython41, I noticed strange mesh behavior when editing cells.
I give a code example.
import wx
import wx.grid
class Frame(wx.Frame):
def __init__(self, parent):
super().__init__(parent)
vbox = wx.BoxSizer(wx.VERTICAL)
grid = wx.grid.Grid(self, size=(384, 128))
vbox.Add(grid, flag=wx.ALL, border=5)
vbox.Fit(self)
self.SetSizer(vbox)
self.Layout()
grid.CreateGrid(3, 3)
table = grid.GetTable() # type: wx.grid.GridTableBase
table.SetValue(0, 0, '11')
table.SetValue(1, 0, '22')
grid.SetCellEditor(0, 0, wx.grid.GridCellNumberEditor())
grid.SetCellEditor(1, 0, wx.grid.GridCellNumberEditor())
grid.SetCellRenderer(0, 0, wx.grid.GridCellNumberRenderer())
grid.SetCellRenderer(1, 0, wx.grid.GridCellNumberRenderer())
if __name__ == '__main__':
app = wx.App()
frame = Frame(None)
frame.Show()
app.MainLoop()
The problem is that I switch to cell editing mode, and then move the cursor
to the borders of the edited cell, the editor automatically closes.
In previous versions, exit from editing mode occurred only when the editor
lost focus.
Why is this happening?
WxPython 4.1.0
Python 3.7.7
Windows 10
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/5f0b4be0-fd77-46ca-86da-b60d8a56c04fo%40googlegroups.com.