W wkd24154 Member² Oct 1, 2003 #1 Hi everybody, is there any way of knowing which TField has the focus? I don`t mean the DB...-Components.
Hi everybody, is there any way of knowing which TField has the focus? I don`t mean the DB...-Components.
Marco Kalter Administrator Staff member Oct 1, 2003 #1 You can use the Screen.ActiveControl property, verify whether it is a "known" data-aware control, and if so, obtain the field. For example: Code: if Screen.ActiveControl is TDBEdit then ShowMessage(TDBEdit(Screen.ACtiveControl).Field.Name); Click to expand... This just checks for TDBEdits. ------------------ Marco Kalter Allround Automations [This message has been edited by mkalter (edited 01 October 2003).]
You can use the Screen.ActiveControl property, verify whether it is a "known" data-aware control, and if so, obtain the field. For example: Code: if Screen.ActiveControl is TDBEdit then ShowMessage(TDBEdit(Screen.ACtiveControl).Field.Name); Click to expand... This just checks for TDBEdits. ------------------ Marco Kalter Allround Automations [This message has been edited by mkalter (edited 01 October 2003).]