radio buttons

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
Glenn Boyce
Posts: 137
Joined: Thu Jul 24, 2008 11:22 pm

radio buttons

Post by Glenn Boyce » Thu Oct 30, 2008 3:17 am

I have 3 radio buttons in a group. Each has a name. I want to put the name of which ever one is highlighted into a field. How do I do that. I can't find any scripting reference to radio buttons.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Oct 30, 2008 3:31 am

Hi Glenn,

I believe it is something like this, in the script of a group containing the radio buttons:

Code: Select all

on mouseUp
  put the name of the hilitedButton into fld "Your Field"
end mouseUp
If it doesn't work, look up hilitedButton in the docs.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

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

Post by Klaus » Thu Oct 30, 2008 10:18 am

Or just use (in the group script):

Code: Select all

on mouseUp 
  put the hilitedButtonName of me into fld "Your Field" 
end mouseUp
:-)


Best

Klaus

Post Reply