Rx Spin Edit

RX Library

Control Name Unit Class
RX Spin Edit RxSpin TRxSpinButton

Description:
Use the TRxSpinButton to add an up-down control to a form, which consist of a pair of arrow buttons, such as the arrows that appear in a spin box. Spin buttons allow users, for example, to change the size of a numerical value by clicking on arrow buttons.

The TRxSpinEdit component combines a edit field with two buttons forming a spinner.

The edit portion of the TRxSpinEdit component can only accept numeric data and the buttons allow the user to increment and decrement the value.

This component can accept integer values as well as
floating point values. To only allow integers, set the (ValueType = vtInteger). If you are using floating point values, use the decimal property to specify the number of decimal places used by a spin edit when displaying floating point values (ValueType = vtFloat).

The
Increment property is used to specify the amount the Value is incremented or decremented when one of the buttons is pressed. Increment can be a floating point value.
(In other words, if the increment property is 10, the value is incremented or decremented +/- 10).


Property Down : readonly
Declaration: Down: TSpinButtonState;

The Down property of a spin button determines the current button state.
(In other words, if the user has depressed the spin button, this property is set to true)


Property DownGlyph
Declaration: DownGlyph: TBitmap;

Use this property to override the default down arrow bitmap used for a spin button component.
(In other words, store your own glyph in this property if you want to use another glyph instead)


Property UpGlyph
Declaration: UpGlyph: TBitmap;

Use this property to override the default up arrow bitmap used for a spin button component.
(In other words, store your own glyph in this property if you want to use another glyph instead)


Event OnBottomClick
Declaration: OnBottomClick: TNotifyEvent;

The OnBottomClick event is triggered when the user clicks the spin buttons in the spin button control.
(In other words, if the user clicks the arrow buttons on the TRxSpinEdit to increment or decrement the spin button value, this event is triggered)


Event OnTopClick
Declaration: OnTopClick: TNotifyEvent;

The OnTopClick event occurs when the user clicks the top button in the spin button control.


Property Decimal
Declaration: Decimal: Integer;

This value specifies the number of decimal places to be utilised.


Property EditorEnabled
Declaration: EditorEnabled: Boolean;

Set this property to True to allow a user to type in a numeric value into the edit portion. When this property is False, only the buttons or arrow keys can be used to modify the Value.


Property Increment
Declaration: Increment: Double;

Use this property to specify the amount the Value property is incremented or decremented by when one of the spin buttons is pressed or when either the up or down arrow key is pressed.

Note that the Increment property can be set to a floating point value, thus allowing non-integer increments.


Property MaxValue
Declaration: MaxValue: Double;

Use this property to specify the maximum Value that can be entered.


Property MinValue
Declaration: MinValue: Double;

Use this property to specify the minimum Value that can be entered.


Property Value
Declaration: Value: Double;

This property contains the contents of the edit portion. It is in floating point format.


Property ValueType
Declaration: ValueType: TValueType;

Set this property to vtInteger to restrict values to Integers and to vtFloat to allow floating values input. If keyboard entry is allowed via EditorEnabled, the user is not allowed to enter a decimal point. Therefore, the Decimal property has no effect when ValueType is vtInteger.


Const InitRepeatPause
Declaration: InitRepeatPause = 400;

Pause before repeat timer (MSec).


Const RepeatPause
Declaration: RepeatPause = 100;;

Pause before hint window displays (MSec).


Type TSpinButtonState
Declaration: TSpinButtonState = (sbNotDown, sbTopDown, sbBottomDown);

The TSpinButtonState type contains the values the Down property of spin buttons (TRxSpinButton) can assume.


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000