|
Total Access Components Tour: Spin ButtonThe Spin Button control is a databound control that is used to increment or decrement a numeric value by clicking on or holding the mouse button down over the control’s “up” or “down” button. It is commonly used in Windows applications in conjunction with a text box containing a numeric value.
Using the Spin Button controlThere are three basic steps for using the Spin Button control: Step 1: Associate the Spin Button control to another controlThis is usually a text box, but it can be any control that displays a
numeric or date value to reflect the value when the user presses the
spin buttons. Step 2: Modify the Spin Button control’s propertiesOpen the spin button control’s property sheet by right-clicking on the
control, selecting FMS Spin Control Object, and choosing
Properties. The Min and Max properties should always be set to the
lower and upper limits of the input required. To use the control to
increment or decrement a value, the LargeChange and SmallChange
properties should be set to values which are applied to another
control when the OnSpin event occurs. To allow the spin control’s
OnSpin event to fire repeatedly while depressing either of its
buttons, check the AutoIncrement property. The RollOver property
allows the spin control’s value to cycle (reset to the Min or Max
value if you try to “go past” them). Step 3: Write code for changes to the Spin control’s valueFor the spin button control’s OnSpin event, write code to change the associated control’s value by substituting the spin control’s Value property, or by adding/subtracting the spin control’s LargeChange or SmallChange property values to/from the value in the associated control. Spin Button Properties
Spin Button Events
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Contact Us
l Web questions: Webmaster
l Copyright
© 2008 FMS, Inc. Celebrating 22 Years of Software Excellence |