RangeHigh, RangeLow
These events take the place of the old Range clause of @ ... GETs. For text boxes and spinners, they fire on the way out and ensure that the value is within the specified range. If not, focus stays on the current control.
Usage |
PROCEDURE oObject.RangeHigh [ LPARAMETERS nControlIndex ] RETURN nRangeHigh PROCEDURE oObject.RangeLow [ LPARAMETERS nControlIndex ] RETURN nRangeLow |
If you do choose to use these events, ensure that your routines return a numeric value, or a nasty infinite loop can occur, with the stupid control insisting "Range: to .T." Ever tried to type a .T. into a spinner? It's not easy! Incidentally, these events are just as stupid if you reverse the High and Low values. |
Example |
* This method might be used for a text box on a form where * the lower bound is based on another value entered on the * same form. PROCEDURE txtGrade.RangeLow RETURN ThisForm.nAge - 5 |
See Also |
DisplayValue, KeyboardHighValue, KeyboardLowValue, LostFocus, SpinnerHighValue, SpinnerLowValue, Valid |