Overview | Methods | This Package | All Packages
OverviewMethodsThis PackageAll Packages
Form.setActiveControl
Sets the the input focus to the specified control.
Syntax
public final void setActiveControl( Control value )
Parameters
value
A Control object that specifies the control which to give the input focus.
Remarks
When you call this method, the control specified in the value parameter becomes the active control on the form, and receives the input focus, provided that the form itself has been activated. If the form is inactive, the control does not receive input focus until the form is activated. If you want to respond specifically to the activation or deactivation of a form, you must add activate and deactivate event handlers to your form-derived class.
When the control or a child of the control becomes the active control, an enter event is triggered for that control. When the control loses focus, the control's leave event is triggered.
See Also getActiveControl