Setting a button to "pushed down" state?

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Setting a button to "pushed down" state?

Post by Garrett » Wed Nov 12, 2008 5:06 am

Is it possible to have a button stay pushed in until the user clicks on a button again, and then let it come back up to a normal state?

Like I want a button for say "Word Wrap" in a text editor. If it's not currently in wrap mode, the button is normal like all the other buttons, but if the user presses that button, it's pushed down, stays down and Wrap is now on. Then if the user clicks that button again, it comes back up and Wrap is off.

Thanks in advance,
~Garrett

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

Post by Janschenkel » Wed Nov 12, 2008 6:27 am

Look at the 'hilite' property of buttons. For checkboxes, this dictates whether they're checked - and for other buttons it dictates whether it's pushed in.

HTH,

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

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Wed Nov 12, 2008 8:53 am

Oooo... Sweet! Thanks Jan :-)

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

Post by Klaus » Wed Nov 12, 2008 12:14 pm

Yep, simply uncheck the "autohilte" feature of your button(s) and roll your own un-/hilite routine.

Post Reply