et scrollbar values to decimals -- 1/100's ths
Jim Hurley
jhurley at infostations.com
Wed Feb 2 09:56:06 EST 2005
>
>Sivakatirswami wrote:
>I set a scroll bar number format to "#.00" but I am unable to set the
>beginning and ending values to a decimal value.. Are we only allowed
>positive whole integers ? (That's what I seem to be limited to...)
>
Yes, only positive integers. But you can achieve the fractional
effect in the scroll bar handler. For example in a scroll bar with 0
and 100 as the start and end values:
on scrollbarDrag newThumbPosition
set numberformat to ".00"
put 100 - newThumbPosition into temp--or "put the endvalue of me -
newThumbPosition"
put temp/100 into myValue
put myVlaue into field "myField"
end scrollbarDrag
This, in effect, reverses the start and end values, and puts a
decimal value into myField. There's no limit to the way in which you
can manipulate the value returned by the thumb position.
Jim
More information about the use-livecode
mailing list