Rollover text

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ac11ca
Posts: 41
Joined: Sun Mar 16, 2008 2:22 am

Rollover text

Post by ac11ca » Tue Mar 25, 2008 11:25 am

Hi, this is probably an easy one ... can someone please tell me the coding to get rollover text? Specifically, I want it so that when a user moves their mouse over a button, some text comes up in a small box, much like it does when you roll the mouse over Windows Start button and you get "Click here to begin". Im sure it includes onMouseEnter/Exit, but Im not sure about the exact coding in the middle...

Thanks for any help,
Adrian.

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Tue Mar 25, 2008 11:56 am

Hi ac11ca,

you are right this works with "mouseenter" etc...
You need a button and a field for the info text.
Put this into the script of the "rollover" button:

Code: Select all

on mouseenter
  ## Show into text...
  put "This is a button!" into fld "You info field here"
end mouseenter

on mouseleave
  ## Hide info text again...
  put empty into fld "You info field here"
end mouseleave
That's it, you get the picture :-)


Regards

Klaus

ChristopherBodell
Posts: 52
Joined: Sun Jan 20, 2008 7:06 am

Try the tooltip...

Post by ChristopherBodell » Tue Mar 25, 2008 3:47 pm

You can also use the "tooltip" command...

Code: Select all

on mouseEnter
         set the toolTip of me to "Some Text"
         end mouseEnter
That code would be in the button....

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Wed Mar 26, 2008 7:40 pm

Ah, yes, maybe that is what "acelevenca" means?!

And this is something that does not even require scripting, as long as the "tooltip" is just static text.

ac11ca
Posts: 41
Joined: Sun Mar 16, 2008 2:22 am

Post by ac11ca » Sun Mar 30, 2008 9:59 am

Excellent! Thank you both.

Adrian

Post Reply