little arrows Increase/decrease a field value

Klaus Major klaus at major-k.de
Sat Oct 8 09:26:28 EDT 2005


Hi Bob,

> Quoting rev at armbase.com:
>
> Oh yeah. I'm in Homer Simpson mode today.... :-)
> Helps if I get the names right. I forgot the t before the name.
> Brackets not needed. Both work
>
> on scrollbarLineDec
>  Put field ButtonWidth into tBtnWidth
>  put tBtnWidth + 1 into BtnWidth
>  Put BtnWidth into field ButtonWidth
> end scrollbarLineDec
>
> on scrollbarLineInc
>    Put field ButtonWidth into tBtnWidth
>  put (tBtnWidth -1) into BtnWidth
>  Put BtnWidth into field ButtonWidth
> end scrollbarLineInc

save some typing with:

on scrollbarLineDec
    add 1 to field ButtonWidth
end scrollbarLineDec

on scrollbarLineInc
  subtract 1 from field ButtonWidth
end scrollbarLineInc

:-)



Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list