Home

Control's Properties: The Focus

 

Once a control is visible, the user can use it. Some controls allow the user only to read their text or view what they display. Some other controls allow the user to retrieve their value or to change it. To perform such operations, the user must first give focus to the control. The focus is a visual aspect that indicates that a control is ready to receive input from the user. Various controls have different ways of expressing that they have received focus.

Button-based controls indicate that they have focus by drawing a dotted rectangle around their caption. In the following picture, the button on the right has focus:

Focus

A text-based control indicates that it has focus by displaying a blinking caret. A list-based control indicates that it has focus when one of its items has a surrounding dotted rectangle:

Focus

To give focus to a control, the user can press a key such as Tab. To programmatically give focus to a control, call the Focus() method.

 

 

 

Home Copyright © 2008 FunctionX, Inc.