I have grids in my app and I want to disallow row resizing by the user.
I tried this:
self.Bind(wx.grid.EVT_GRID_ROW_SIZE, self.OnResize, self)
self.Bind(wx.grid.EVT_GRID_CMD_ROW_SIZE, self.OnResize, self)
def OnResize(self, event):
event.Veto()
This issue with this is sometimes (non-deterministically) row resize
is allowed, though for most part resizing is not allowed.
I also tried:
self.GetGridWindow().Bind(
wx/grid.EVT_GRID_ROW_SIZE,
self.OnRowSize,
self.GetGridWindow()
)
from a previous post about EVT_MOTION not working in a grid and same results.
Does anyone have any suggestions as to why row resizing is allowed,
albeit sporadically?
I have another bit of input, that I think might have some bearing on
this (mis)behavior. I have a grid row mixin to enable drag and drop
functionality (adapted from wxPy Wiki) and the mixin (of which my grid
class is a subclass) binds EVT_LEFT_DOWN. Will this interfere with the
Grid row size events?
This (or a similar) problem was reported a while ago as RFE 852379. It may still be an issue if it has not been fixed. Here is a reference to the thread
from a previous post about EVT_MOTION not working in a grid and same results.
Does anyone have any suggestions as to why row resizing is allowed,
albeit sporadically?
I have another bit of input, that I think might have some bearing on
this (mis)behavior. I have a grid row mixin to enable drag and drop
functionality (adapted from wxPy Wiki) and the mixin (of which my grid
class is a subclass) binds EVT_LEFT_DOWN. Will this interfere with the
Grid row size events?