New to Telerik UI for WinForms? Start a free 30-day trial

Represents a RadAutoCompleteBoxElement keyboard and mouse input handler

Definition

Constructors

Initializes a new instance of the AutoCompleteBoxInputHandler class.

C#
public AutoCompleteBoxInputHandler(RadAutoCompleteBoxElement textBoxElement)
Parameters:textBoxElementRadAutoCompleteBoxElement

The text box element.

Methods

Gets the text block at point.

C#
protected ITextBlock GetTextBlockAtPoint(Point location)
Parameters:locationPoint

The location.

Returns:

ITextBlock

Defers Enter handling when auto-completion is enabled and AcceptsReturn is set; otherwise uses the base selection behavior.

C#
protected override bool ProcessEnterKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The Enter key event.

Returns:

bool

false when auto-completion is enabled and AcceptsReturn is set; otherwise, the base handler's result.

Overrides: TextBoxInputHandler.ProcessEnterKey(KeyEventArgs)

Leaves Up and Down keys to caret navigation when the text box is multiline and its suggestion popup is closed.

C#
protected override bool ProcessListNavigation(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event used to navigate suggestions.

Returns:

bool

false for multiline caret navigation with a closed popup; otherwise, the base list-navigation result.

Overrides: TextBoxInputHandler.ProcessListNavigation(KeyEventArgs)

Closes the suggestion popup on a handled left click and selects a whole token when the click is outside its remove button.

C#
public override bool ProcessMouseDown(MouseEventArgs e)
Parameters:eMouseEventArgs

The mouse event received by the text box.

Returns:

bool

true when the base input handler processes the mouse down; otherwise, false.

Overrides: TextBoxInputHandler.ProcessMouseDown(MouseEventArgs)

Closes the suggestion popup before processing Left or Right navigation when auto-completion is enabled.

C#
protected override bool ProcessNavigationKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The navigation key event.

Returns:

bool

The result of the base navigation handler.

Overrides: TextBoxInputHandler.ProcessNavigationKey(KeyEventArgs)

Uses the default cursor over token blocks and the base text cursor behavior elsewhere.

C#
protected override bool SetCurrentCursor(Point location)
Parameters:locationPoint

The pointer location in the text box.

Returns:

bool

false over a token block; otherwise, the result of the base cursor update.

Overrides: TextBoxInputHandler.SetCurrentCursor(Point)