RELEASE MODULE

Increment

This property applies to spinners and determines how much the spinner changes each time you click one of the arrows.

Usage

spnSpinner.Increment = nValue nValue = spnSpinner.Increment
Increment can be either positive or negative. With a negative increment, clicking the up arrow (or pressing the up arrow key) decreases the displayed number, while clicking the down arrow increases it. Weird, but we guess you might want to do it when dealing with dates or times where up could mean further back in time and down could mean more recent.

Increment can be changed while a form is active. For example, you might relate the increment to the magnitude of the spinner value. For instance, increment by 2 until you reach 100, then go by 5 until 200, then by 10. Like the other spinner properties, you can't set the property itself to change dynamically, but you can change the property programmatically while the form is running. The example shows the code.

Example

* Update spinner increment to be based on the spinner value * The following code goes in the spinner's InteractiveChange  * method, so the increment is checked each time the spinner * value changes. DO CASE CASE This.Value < 100    This.Increment = 2 CASE This.Value < 200    This.Increment = 5 OTHERWISE    This.Increment = 10 ENDCASE
If the program changes the spinner value in code, too, you'd need to do the same thing in the spinner's ProgrammaticChange method.

See Also

KeyboardHighValue, KeyboardLowValue, SpinnerHighValue, SpinnerLowValue


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net