A ShowTooltip ?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

A ShowTooltip ?

Post by jmburnod » Thu May 21, 2009 9:02 pm

Hi All,

What is the best way to show the tooltyp only when a condition is true (the hilite of a btn "help" p.e) ?


Jean-Marc

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Fri May 22, 2009 6:51 am

Probably the easiest way is to save all the different tooltips in a custom property set, and change the tooltip upon mouseEnter.
You can define custom properties by script via a button or the message box, or manually using the Inspector palette in the Rev IDE. Let's assume you've created a custom property set named "uTooltips" and have three conditions "green","yellow" and "red".

Code: Select all

on mouseEnter
  -- insert some logic to decide on the condition
  -- and put it into a variable named 'tCondition'
  put "green" into tCondition
  set the tooltip of me to the uToolTip[tCondition] of me
end mouseEnter
HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

A ShowTooltip ?

Post by jmburnod » Fri May 22, 2009 8:18 am

Thanks Jan,

I do that and a script for the gestion of the customprop of all visibles objects

Jean-Marc

Post Reply