Getting vScroll movement of a field scrollbar

André.Bisseret Andre.Bisseret at inria.fr
Tue Dec 11 07:46:45 EST 2007


Hello,
Could be I am wrong (I don’t know what’s your aim with your buttons),  
but one solution could be to replace your buttons with images and use  
the imageSource of characters:

- choose (if possible) a character that is impossible to appear in  
your field (e.g., $, €, £, %, …).
- set the textStyle of this character to link
- past an image in your stack and
- set the imageSource of the char to the ID number of this image.

If the field has its lockText property set to true, then the image is  
clickable.

Then, in the field script, you can have a handler of the following  
type :
ON mouseUp
	IF the textstyle of the clicktext is « link » THEN
	- -     the handler of your current button
	END IF
END mouseUp

Just an idea, don’t know if that could help

Best regards from Grenoble
André


Le 11 déc. 07 à 00:05, James Hurley a écrit :

> I have a field with button superimposed on the text.
>
> I would like the buttons to scroll with the field.
>
> I set the field script to:
>
> local tStart
>
> on mouseDown
>    put the vScroll of me into tStart
> end mouseDown
>
>
> on scrollbarDrag newValue
>   put tStart & comma &  newValue into msg box
> end scrollbarDrag
>
> The idea was to get the vertical movement of the scrollbar and move  
> the buttons accordingly.
>
> But the field's scrollbar does not appear to get the  mouseDown  
> message and so I don't get the  tStart variable
>
> How do I get the initial position  of the scrollbar?
>
> Jim Hurley
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>





More information about the use-livecode mailing list