More fun with tooltips

Thomas McGrath III 3mcgrath at adelphia.net
Sun Feb 19 10:45:10 EST 2006


Graham,

Thanks for the clever comment ;-)

The problem is that tooltips are directly related to the physical  
position of the mouse on screen. I have successfully figured out how  
to prolong the hang time of a tooltip but when trying to substitute  
tooltips while one is open only works sporadically and is at that  
point a hack. Meaning I would not put it in a commercially viable  
product since it is not reliable.

I have figured out how to script a progressive approach to getting  
the tooltips of multiple objects to appear at a pre defined time. But  
I must warn you that the solution is in moving the mouse on screen  
for the user, this is not generally considered a good thing in UI.  
However I believe that if you are switching 'modes' ,if you will, to  
a tutorial or help system or walk through system then it is okay to  
do so.

OK, so if you have three buttons each with a tooltip and you want to  
show them in order 1,2,3 then you need to set the tooltip duration  
via script:

	set the toolTipDelay to 200 -- lower is faster - 500 is default

Then you need to set the moveSpeed for the mouse to move so the user  
can follow it:

	set the moveSpeed to mySpeed -- mySpeed is between 20 - 600, 20 is  
slow and 600 is fast - I use 250

Then you need to build a list of the buttons or objects and set the  
screenMouseLoc to the globalLoc of each button and then wait a sec  
and move on to the next one etc.

Change the 'toolTipDelay' (lower number is faster), the  
'moveSpeed' (higher number is faster) and the 'wait' time (higher  
numbers for longer waits) to your particular needs and there you have  
it; a help system that goes through each buttons tooltip. Here is a  
script (tested) that will do it:

-- Create four buttons: "One", "Two", "Three", and "Run"
----------------------------
on mouseUp
     set the toolTipDelay to 150
     set the moveSpeed to 250
     put "One" & cr & "Two" & cr & "Three" into lMyList
     repeat with g = 1 to the number of lines in lMyList
         set the screenMouseLoc to globalLoc(the loc of button g) --  
set the mouse at the buttons loc calling up tooltip
         set the cursor to hand
         wait 4000 milliseconds with messages
     end repeat
     set the screenMouseLoc to globalLoc(the loc of button "Run") --  
set back to Run button
end mouseUp
----------------------------

I have the sample stack in my RevOnline space at
User: mcgrath3
Stack: "Tool Tip Reveal"

Hope this helps

Tom

On Feb 19, 2006, at 3:13 AM, Graham Samuel wrote:

> On Sat, 18 Feb 2006 14:11:55 -0500, Thomas McGrath III  
> <3mcgrath at adelphia.net> wrote:
>
> [some clever stuff about tooltips]
>
> Tom, if you understand tooltips well, maybe you could suggest how  
> to do something I've always wanted to do: program a button so that  
> when pressed, it lights up all the tooltips on a given card at the  
> same time. I thought of doing this as a kind of cheap 'help'  
> system, but I have not so far found any way of doing it.
>
> Graham
>
>
> ---------------------------------------------------------------------- 
> -----
> Graham Samuel / The Living Fossil Co. / UK and France
>
> _______________________________________________
> 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

Thomas J McGrath III
3mcgrath at adelphia.net

Lazy River Software™ - http://www.lazyriversoftware.com

Lazy River Metal Art™ - http://www.lazyriversoftware.com/metal.html

Meeting Wear™ - http://www.cafepress.com/meetingwear

Semantic Compaction Systems - http://www.minspeak.com

SCIconics, LLC - http://www.sciconics.com/sciindex.html










More information about the use-livecode mailing list