- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Initialize all radio buttons to be empty
Hi, is there anyway to initialize all radio buttons to be empty? When running the script, the "Yes" button is filled in by default; however, I would like them to both begin as empty buttons. Is this possible?
New Window( "Warning", <<Modal, Panel Box( "Would you like to continue?.", rbox1 = Radio Box( {"Yes", "No"}, rb1 = rbox1 << get selected ), ), )
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Initialize all radio buttons to be empty
JSL is an interpretive language. Therefore, it does not know about an object until it is actually created. So I am not sure how you would handle what you are asking, other than following a rule, that whenever you define a radio box, you always set the values to blank.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Initialize all radio buttons to be empty
As I understand it radio buttons exist so one choice is always selected.
For the application as you describe it I would use two check boxes. The OnCheck script can be used to send a command to the other check box to set its state to unchecked (so only 1 box max was checked). You would also need code to prompt the user if they try to continue with no boxes checked.
Why are the simple OK, Cancel buttons that work well with <<Modal insufficient?
For the application as you describe it I would use two check boxes. The OnCheck script can be used to send a command to the other check box to set its state to unchecked (so only 1 box max was checked). You would also need code to prompt the user if they try to continue with no boxes checked.
Why are the simple OK, Cancel buttons that work well with <<Modal insufficient?