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 DesktopUpDownArrows in the Language Reference for details on all its events, properties and methods.

Below are the commonly used events.

Events

DownPressed - Called when the down arrow is pressed.

UpPressed - Called when the up arrow is pressed.

Handling Focus

UpDown Arrows can get the focus only on Windows. When an UpDown Arrows 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 AllowFocus property to True to enable an UpDown Arrows control to get the focus.

Usage

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

In the DownPressed event handler:

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

In the UpPressed event handler:

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

See Also

DesktopUpDownArrows class