开发者

wxGrid: how can I unbind EVT_GRID_CELL_CHANGE?

开发者 https://www.devze.com 2022-12-18 16:39 出处:网络
If I bind it in the following way: wx.grid.EVT_GRID_CELL_CHANGE(self.m开发者_StackOverflow社区ygrid, self.on_cell_change)You shouldn\'t bind events like that, that is the old way of doing it.

If I bind it in the following way:

wx.grid.EVT_GRID_CELL_CHANGE(self.m开发者_StackOverflow社区ygrid, self.on_cell_change)


You shouldn't bind events like that, that is the old way of doing it.

Use self.Bind(wx.grid.EVT_GRID_CELL_CHANGE, self.on_cell_change). You can then also use self.Unbind(wx.grid.EVT_GRID_CELL_CHANGE) to solve your question

(if self is the grid in this example)

Interesting article: http://wiki.wxpython.org/self.Bind%20vs.%20self.button.Bind

0

精彩评论

暂无评论...
验证码 换一张
取 消