Python Forum

Full Version: Event for wx.grid
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I use wx.grid.Grid on a wx form.
I need to get an event fired only when I hit Enter key after typing in text in a grid cell. Is it possible? Thanks.
You can use:

self.grid.Bind(EVT_GRID_CELL_CHANGED, self.on_cell_change, cell)
It may fire on each character, not sure, so if it does, you will have to look for line feed on end.
I was trying to find an on cell exit event, but didn't find one (there may still be one that I didn't discover)
And finally, there's always a custom event (if interested, see: https://gist.github.com/driscollis/75e51...4ac63e65c7 )