Python Forum
Event for wx.grid
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Event for wx.grid
#1
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.
Reply
#2
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 )
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020