Options buttons and script
Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21
Options buttons and script
Hello,
How set the "selected" button of a cluster by script.
I try without success :
set the mgoption of grp "xx" to the id of grp "yy" of grp "xx"
xx = the cluster
yy = the button.
The goal is to "reset" alls choices and returns to default value for each controls.
Thanks.
How set the "selected" button of a cluster by script.
I try without success :
set the mgoption of grp "xx" to the id of grp "yy" of grp "xx"
xx = the cluster
yy = the button.
The goal is to "reset" alls choices and returns to default value for each controls.
Thanks.
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Options buttons and script
Hi, Ludo.
If you have a cluster of 3 options buttons (Option1, Option2 and Option3), you can select one by;
HTH!
If you have a cluster of 3 options buttons (Option1, Option2 and Option3), you can select one by;
Code: Select all
send "mouseDown" to group "Option1"
LiveCode Development & Training : http://splash21.com
Re: Options buttons and script
So simple ! Thanks !splash21 wrote:Hi, Ludo.
If you have a cluster of 3 options buttons (Option1, Option2 and Option3), you can select one by;HTH!Code: Select all
send "mouseDown" to group "Option1"
-
- VIP Livecode Opensource Backer
- Posts: 7240
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Options buttons and script
Are they really option buttons or are they radio buttons? If they are radio buttons then use either the hilitedButtonName or the hilitedButton.
Code: Select all
set the hilitedButtonName of grp xx to yy
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Options buttons and script
They are custom buttonsjacque wrote:Are they really option buttons ... ?
LiveCode Development & Training : http://splash21.com
Re: Options buttons and script
I was having a problem with navigating to a card that contained my mg control group where the correct button wasn't highlighted. This worked for me in the card script:
on opencard
send "mouseDown" to group "Home"
put "Home" into fld "mgcLabel"
end opencard
on opencard
send "mouseDown" to group "Home"
put "Home" into fld "mgcLabel"
end opencard
Re: Options buttons and script
actually,
put "Home" into fld "mgcLabel"
stopped working, not sure why.
when navigating to card 2 which contains my MobGui control group from my splash card (that does not contain the control group), the title still shows the last tab option and potentially the wrong tab option...
put "Home" into fld "mgcLabel"
stopped working, not sure why.
when navigating to card 2 which contains my MobGui control group from my splash card (that does not contain the control group), the title still shows the last tab option and potentially the wrong tab option...
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Options buttons and script
Hi, Roddy. If you're referencing the control components, you can also specify the actual control group;
Does this help?
Code: Select all
put "Home" into fld "mgcLabel" of group "MyButton"
LiveCode Development & Training : http://splash21.com