How can I use LC to set the "ON" or "OFF" of an option button? I want to be able to show the user what preferences he/she has already set.
Thanks in advance!
Jack Rarick
Braintree Athletic Systems
Using code to set an OPTION button
Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21
Re: Using code to set an OPTION button
Do you mean a Radio Button? If not, what platform are you talking about?
Re: Using code to set an OPTION button
If you mean an Option button ... as in a group of buttons that allow for one of many options to be set then it is:
mobGUItouch the long id of group "YourButtonName"
i.e.
mobGUItouch the long id of group "Option 3"
If you mean the On/Off toggle, then use:
switchSet "YourControlNameHere", "Status"
i.e.
switchSet "My Choice 1", "On"
--John
mobGUItouch the long id of group "YourButtonName"
i.e.
mobGUItouch the long id of group "Option 3"
If you mean the On/Off toggle, then use:
switchSet "YourControlNameHere", "Status"
i.e.
switchSet "My Choice 1", "On"
--John
jrarickGAec4d wrote:How can I use LC to set the "ON" or "OFF" of an option button? I want to be able to show the user what preferences he/she has already set.
Thanks in advance!
Jack Rarick
Braintree Athletic Systems
Re: Using code to set an OPTION button
Hey Jack,
Did you ever figure out how to get the On/Off iOS Switch button to work?
John's "switchSet" code example only works for me when in LiveCode developing.
When I try to use it in the simulator or on my device then nothing happens.
This is frustrating because if my user turns the button to "ON" then when they close and re-open the app the button will have reset to "OFF".
Thanks!
Did you ever figure out how to get the On/Off iOS Switch button to work?
John's "switchSet" code example only works for me when in LiveCode developing.
When I try to use it in the simulator or on my device then nothing happens.
This is frustrating because if my user turns the button to "ON" then when they close and re-open the app the button will have reset to "OFF".
Thanks!