Skip to main content

TcxCustomSpinButton.Associate Property

Specifies a TWinControl descendant associated with the current spin button.

Declaration

property Associate: TWinControl read; write;

Property Value

Type
TWinControl

Remarks

Use the Associate property to link a TWinControl descendant to the spin button.

If a spin button is associated with an edit control, then the edit control’s value is obtained from the spin button’s Value property (0 by default). When the edit control has focus, then the associated spin button handles pressing the Up, Down, PageUp and PageDown keys. Pressing the Up key or the right/up spin button increases the edit control value while pressing the Down key or the left/down spin button decreases it (increment/decrement is specified by the Properties.Increment property).

After a spin button has been associated with a control, it is positioned at the right edge of this control:

Spin buttons also provide fast navigation through the edit control’s values. Fast navigation is performed when a user presses fast buttons or the PageUp/PageDown keys. In order to enable fast buttons, set the Properties.SpinButtons.ShowFastButtons property to True. During fast navigation, the edit control value is increased/decreased by the Properties.LargeIncrement property value.

Note

You should connect a spin button to edit controls in order to obtain full functionality. If you bind a spin button to another type of control, then you need to handle changes to its Value manually (by using the Properties.OnEditValueChanged event handler).

See Also