Focus Management
AlterNET UI includes several API elements to control input focus.
Keyboard focus refers to the object that is receiving keyboard input. The element with keyboard focus has Focused set to true. There can be only one element with keyboard focus on the entire desktop.
Keyboard focus can be obtained through user interaction with the UI, such as tabbing to an element or clicking the mouse on certain elements. Keyboard focus can also be obtained programmatically by using the SetFocus method.
The SetFocus method returns true if the control successfully received input focus. The control can have the input focus while not displaying any visual cues of having the focus. This behavior is primarily observed by the nonselectable controls listed below, or any controls derived from them.
When the user presses the TAB key, the input focus is set to the next control in the tab order. Controls with the TabStop property value of false are not included in the collection of controls in the tab order.
When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the SetFocus or FocusNextControl methods focus events occur in the following order: