ComponentOne Input for WinForms
Move Focus
Input for WinForms Task-Based Help > Move Focus

This feature makes navigating through the controls easier and allows you to add keyboard navigation support to the C1Input (C1TextBox, C1ComboBox, C1DateEdit, C1DropDownControl and C1NumericEdit) controls. The following properties enable you to move focus from or to the C1Input controls.

The table below describes values and behavior of the above properties.

Property Possible Value Description
ExitOnLastChar True Enables moving focus from the C1Input control when the length of text entered reaches the maximum length, defined in the MaxLength property, or when the mask is filled.
False Disables moving focus from the C1Input control when the length of text entered reaches the maximum length, defined in the MaxLength property, or when the mask is filled.
ExitOnLeftRightKey None Disables moving from the C1Input control when the arrow keys are pressed.
Left Enables moving focus to the control on the left side of the C1Input control, when the left arrow key is pressed.
Right Enables moving focus to the control on the right side of the C1Input control, when the right arrow key is pressed.
Both Enables moving focus to the control on either left or right side of the C1Input control, when the respective key is pressed.
TabStop True Enables moving focus to the C1Input control, from the control on the left side of the C1Input control, when the TAB key is pressed.
False Disables moving focus to the C1Input control, from the control on the left side of the C1Input control, when the TAB key is pressed.

Complete the following steps to enable or disable this feature in the C1Input control:

  1. Create a new Windows Application project. Place a C1Input control (C1TextBox, C1ComboBox, C1DateEdit, C1DropDownControl or C1NumericEdit) on the form.
  2. From the Properties window, set either one or all of the following properties, as per your requirement.
    • Set the ExitOnLastChar to true or false, to enable or disable moving focus from the control when the text entered reaches the maximum length.
    • Set the ExitOnLeftRightKey to Left, Right or Both, to enable moving the focus from the control when the respective key is pressed.
    • Set the TabStop to true or false, to enable or disable moving focus to the C1Input control, when the tab key is pressed.
See Also