Control.SelectNextControl Method
Assembly: System.Windows.Forms (in system.windows.forms.dll)
public: bool SelectNextControl ( Control^ ctl, bool forward, bool tabStopOnly, bool nested, bool wrap )
public boolean SelectNextControl ( Control ctl, boolean forward, boolean tabStopOnly, boolean nested, boolean wrap )
public function SelectNextControl ( ctl : Control, forward : boolean, tabStopOnly : boolean, nested : boolean, wrap : boolean ) : boolean
Not applicable.
Parameters
- ctl
The Control at which to start the search.
- forward
true to move forward in the tab order; false to move backward in the tab order.
- tabStopOnly
true to ignore the controls with the TabStop property set to false; otherwise, false.
- nested
true to include nested (children of child controls) child controls; otherwise, false.
- wrap
true to continue searching from the first control in the tab order after the last control has been reached; otherwise, false.
Return Value
true if a control was activated; otherwise, false.The SelectNextControl method activates the next control in the tab order if the control's Selectable style bit is set to true in ControlStyles, it is contained in another control, and all its parent controls are both visible and enabled.
The Windows Forms controls in the following list are not selectable. Controls derived from controls in the list will also not be selectable.
-
LinkLabel (when there is no link present in the control)
When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the Select or SelectNextControl methods, or by setting the ContainerControl.ActiveControl property to the current form, focus events occur in the following order:
If the CausesValidation property is set to false, the Validating and Validated events are suppressed.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.