Get Active Control

How do I query the system for the id of the active control? I want to trap the TAB keys (x1=9) while the active control is a button or other control (except for a TextEdit control which sends a CONTROL DESELECTED event when TAB is pressed) so that I can move from one control to another using the tab key. Also, is there a way to highlight a CheckBox so that I know it is the Active control?


Hi, The TrueCtrl library


The TrueCtrl library reserves the use of the TAB key for progressively indexing a series of EDIT controls.

As far as I know TrueCtrl doesn't keep track of the current active object. However it is possible to do this yourself using a simple variable that stores the ID of the current active control every time you pass through the TC_event loop. You also have to keep a table of ID numbers so that when you press the TAB key the next ID number in the list is selected.

The CTX library does highlight the CHECKBOX control (by putting a dotted line around the label). TrueCtrl does not have this feature.

Note that some objects in TrueCtrl do not respond to mouse clicks e.g. Static Text, whereas all objects in the CTX library do respond to mouse clicks.

Big John