I have a PageControl object with several pages in separate tabs.
Each tab contains a lot of objects such as TEdits and TComboBoxes.
Lets say I'm in "Tab A" entering text in a TEdit and then the software change tab to "Tab B" and then back to "Tab A". Then the TEdit is no longer selected so I need to select it again to continue writing.
Now to my question:
How can I save/get/store the selected object before change of tab so that I can return to the same object when back to the previous tab?
Screen.ActiveControl was what I where looking for! I solved it like this:
Var FocusObject : TWinControl;
// Save selected object
// Restore selected object