wxGrid and Focus Event

Paul McNett p at ulmcnett.com
Tue Nov 29 20:33:05 CET 2005

lux wrote:
> How can I capture the EVT_SET_FOCUS on a wxGrid?

If you want to catch when the grid as a whole gets the focus, use:

 >>> grid.Bind(wx.grid.EVT_SET_FOCUS, self.onGridFocus)

If you want to catch when a cell in the grid gets the focus, use:

 >>> grid.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.onCellSelected)

And, your questions will be better on the wxpython-users list at

Paul McNett

More information about the Python-list mailing list