Little Arrows, how they are working (and thank you Ken!)

Fran=?ISO-8859-1?B?5w==?=ois Cuneo francois.cuneo at cuk.ch
Sun May 25 02:21:00 EDT 2003


>> Ken, thank you, I have founded it but...
>> I have not understood how to work with this little arrows!!
>> How can I do to script:
>> 
>> If the key is up, then put 1 + 1 into tatsouin
>> If the key is down then put 1 - 1 into tatsouin
>> 
>> In fact, is it possible that somebody show me a little script
>> in 4 lines about how little arrows are working?
> 
> Actually, it doesn't increment or decrement values in a *variable*, but
> in a field. So you do this:
> 
> 1) Select the little arrows control from the Object library and click
> "Place Object"
> 2) Create a field next to the little arrows control that will hold the
> value that the button will put there.
> 3) Give the field a name (for example, "TestField")
> 4) Open the properties palette for the little arrows control, go to
> Custom Properties and set the cTargetField property to the name of your
> field (in my case, "TestField")
> 5) Open the properties palette for the field, go to Custom Properties
> and add two properties: cMinValue and cMaxValue. In them, set the
> minimum and maximum values (I used "1" for cMinValue and "100" for
> cMaxValue).
> 6) Set the script of the field to this:
> 
> on closeField
> end closeField
> 
> That's it! Now choose the browse tool and the little arrows control will
> increment or decrement the number in the field
> 
> If you want to handle doing something after the number has been changed,
> put it in the 'closeField' handler of the field.
> 
> Hope this helps,
Thank you very much Ken, it works, I have tried but!...... Hem...

This Object Library is Little Arrows, yes, but not the little Arrows that we
can create with the tools Palette.

In fact, this Little Arrows in the tools Palette are "Scrollbar" category.
This objects are very good because they are painted like the Aqua interface.
So, I prefer to use it and... For me it's really important to understand how
this Little Arrows (from the Tool Palette) are working.

I have a review to write about Revolution, and I want all know...!:-)
But for my application, this kind of little arrows are really important too.

Thank you

Françoois

-------------- 
François Cuneo
Site Web dédié au Macintosh http://www.cuk.ch
E-mail: francois.cuneo at cuk.ch




More information about the use-livecode mailing list