RAD Studio VCL Reference
TWinControl.SelectNext Method

Moves the input focus from the current child control to the next one in the tab order.

procedure SelectNext(CurControl: TWinControl; GoForward: Boolean; CheckTabStop: Boolean);
__fastcall SelectNext(TWinControl * CurControl, Boolean GoForward, Boolean CheckTabStop);

Call SelectNext to move the child control focus. SelectNext selects the first child that follows or precedes CurControl in the tab order and that meets the criteria specified in the other parameters. 

The GoForward parameter controls the direction of the search. If GoForward is true, FindNextControl searches forward through the child controls in tab order. If GoForward is false, SelectNext searches backward through the controls. The search wraps past the end of the collection back to CurControl. 

The CheckTabStop parameter controls whether the control SelectNext finds must be a tab stop. If CheckTabStop is true, the returned control must have its TabStop property set to true, or the search for the next control continues. 

If a child control matches the search criteria, that control obtains the focus. If no such child control is found, the focus remains unchanged. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!