For a SQL-Database-Frontend I build table-like forms. Therefore i dynamicaly build wx.Controls like wx.TextCtrl or wx.Choice and place them in an wx.GridBagSizer. So we have:
- For each row in the database a row in the sizer with a wx.Control and the data coming from the database as value of this wx.Control.
- Additional this table get a top row with wx.StaticText for each column as Labels.
- A bottom row with wx.Controls without contents to enter new data.
- Finaly there should be a navigation panal above the table to move around in the table, search in it and do some more features.
In this table the user should edit the data, move around, delete data and in the last line enter new data. All that without need to explicit save the data by pressing a button.
Therefore I have to control
- where the cursor and/or the focus is an from where it comes. It would be enough to get out in which row the cursor/focus is and where it has been. It could be something like a ChangedRowEvent. That has to be independent of how the user change the row, using the TAB-key, arrow-keys, ENTER-key or even the mouse
- whether the data in the row we leaved was changed. It could be a boolean variable DataChangedInRow which could be set to True by some event-handlers. But which events are relevant for that?
It would be great to get some hints or directions for further search.