UserGuide

Desktop UpDown Arrows

From Xojo Documentation

Up / Down Arrows Library Icon

The Up Down Arrows control is generally used as an interface for iterating through items. There are two events, Up and Down, that determine whether the user has clicked an arrow.

Refer to UpDownArrows in the Language Reference for details on all its events, properties and methods.

Below are the commonly used events.

Events

Down

Called when the down arrow is clicked.

Up

Called when the up arrow is clicked.

Handling Focus

UpDownArrows can get the focus only on Windows. When an UpDownArrows control gets the focus, a selection rectangle appears around the control. The user can press the Up and Down arrow keys on the keyboard to press the top and bottom arrows in the control. You must set the AcceptFocus property to True to enable an UpDownArrows control to get the focus.

Usage

This code increases or decreases the value in a Text Field as the arrows are clicked.

In the Down event handler:

TextField1.Text = Str(Val(TextField1.Text) - 1)

In the Up event handler:

TextField1.Text = Str(Val(TextField1.Text) + 1)

See Also

UpDownArrows class