Input for WinForms | ComponentOne
Keyboard Navigation / Move Focus
In This Topic
    Move Focus
    In This Topic

    This feature makes navigating through the controls easier and allows you to add keyboard navigation support to the Input controls. The following properties enable you to move focus from or to the Input controls.

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

    Property Possible Value Description
    ExitOnLastChar True Enables moving focus from the Input 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 Input 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 Input control when the arrow keys are pressed.
    Left Enables moving focus to the control on the left side of the Input control, when the left arrow key is pressed.
    Right Enables moving focus to the control on the right side of the Input control, when the right arrow key is pressed.
    Both Enables moving focus to the control on either left or right side of the Input control, when the respective key is pressed.
    TabStop True Enables moving focus to the Input control, from the control on the left side of the Input control, when the TAB key is pressed.
    False Disables moving focus to the Input control, from the control on the left side of the Input control, when the TAB key is pressed.

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

    1. Create a new Windows Application project. Place a Input control 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 Input control, when the tab key is pressed.