tooltip problem

dunbarx at aol.com dunbarx at aol.com
Mon Feb 14 15:15:46 EST 2011


Mark, et al.


Ah. So it is not the latest and greatest idea.


And not updating unless the value has changed does indeed make it less ugly. Nice one.


But why does setting it to empty matter as regards updating the property? The property changes correctly, as I said, it just does not update the display. Anyway, I think I will add a note to the dictionary.


Thanks everyone.


Craig


(I didn't test this one, but this is how I always do it)







-----Original Message-----
From: Mark Schonewille <m.schonewille at economy-x-talk.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Mon, Feb 14, 2011 2:53 pm
Subject: Re: tooltip problem


Hi Craig,

All other solutions posted so far will cause the tooltip to flash in an ugly 
way. Here's how to do it:

on mouseMove
  put (the value of the mouseLine)/36 into myNewTip
  if the tooltip of me is not myNewTip then
    set the tooltip of me to empty
    set the toolTip of me to myNewTip
  end if
end mouseMove

(I didn't test this one, but this is how I always do it)

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 14 feb 2011, at 19:48, dunbarx at aol.com wrote:

> 
> 
> Anyone:
> I want to use the tooltip to display information. I have a field with numbers 
in each line.
> 
> 
> I want to display the number in a line divided by 36. So if I have 72 as a
> value in the line, I would like the tooltip to read "36". Easy, right:
> on mouseMove
>   put the mouseLine
>   set the toolTip of me to the value of the mouseLine / 36
> end mouseMove
> 
> 
> I get a dynamic value for the mouseLine as I move the cursor over various 
lines in the field (this was just a check)
> but the only toolTip I get is when I enter the field. That line responds fine, 
but no other values appear as I move
> the mouse to other lines. I have to exit the field and re-enter at another 
line to see any change. I tried changing toolTipDelay.
> Nothing helps. The toolTip is correctly set as I move around the field ( I 
check it with a mouseLeave handler). It just does not display dynamically. And 
there
> is no "upDateToolTip" command.
> 
> 
> This seems like a cute little gadget. In fact, it would be terrific
> if one was able to place a function in the toolTip property, similar to the 
very powerful ability HC had to place
> custom functions in the contents of the report items.
> 
> 
> So is it me or the toolTip itself? Am I working it too hard? Is it only 
invoked by the engine on mouseEnter? I can easily write a workaround with a tiny 
field, but, well...
> 
> 
> Craig Newman


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the Use-livecode mailing list