Event for wx.grid - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: Event for wx.grid (/thread-10166.html) |
Event for wx.grid - ian - May-16-2018 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. RE: Event for wx.grid - Larz60+ - May-16-2018 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/75e51b3ea6cc80d9a699ea4ac63e65c7 ) |