Page 1 of 1

Radio Button selected by default

Posted: Wed Jul 09, 2014 5:50 pm
by TubooBokBok
Hi I have a card with 3 radio buttons. I want one of the buttons to be selected automatically as soon as my program is run. I tried selecting the default button option in the properties tab but it doesn't seem to do anything Can any help?

Thanks.

Re: Radio Button selected by default

Posted: Wed Jul 09, 2014 5:56 pm
by magice
Which ever one is selected when the app is saved to a stand alone should be the default when the app is run.

Re: Radio Button selected by default

Posted: Wed Jul 09, 2014 5:58 pm
by Klaus
Hi TubooBokBok,

I am sure you have GROUPED your radio buttons! 8)

Then you can set and get "the hilitedbutton of grp XYZ", which is the number of the (target) button,
or "the hilitedbuttonname of grp XYZ", which is the NAME of the (target) button.

Example:

Code: Select all

group "yourRadioButtons
  button "radio1" ## Which is the FIRST button = 1 in the group
  button "radio2" ## button # 2
  button "radio3" ## button # 3
Now if you want to hilite the second button "radio2", you have 2 options:
...
set the hilitedbutton of grp "yourRadios" to 2
...
or
...
set the hilitedbuttonName of grp "yourRadios" to "radio2"
...
Both will hilite the second button "radio2", now choose what fits your situation :D


Best

Klaus

Re: Radio Button selected by default

Posted: Wed Jul 09, 2014 5:59 pm
by Klaus
magice wrote:Which ever one is selected when the app is saved to a stand alone should be the default when the app is run.
Yep, or this way :D

Re: Radio Button selected by default

Posted: Wed Jul 09, 2014 6:01 pm
by TubooBokBok
Awesome thanks alot guys