Handlers for Radio Buttons

I’ve made an app that is basically a bunch of checkboxes, which call a series of 'if then statements which select a their respective ‘do shell script’ when receiving an ‘on click’ from a button.

In one section I want to use a 3row Radio button array. Do I give each button within the radio matrix a name and use that as the handler name, as opposed to naming the matrix and using that handler. Is the only diff between the Radio buttons and the checkboxes the way the buttons interact with each other (one being selected deselects the others)?

TIA, jim

Name all of the individual radio elements and add a “clicked” action for each of them. In your script, add the “on clicked theObject” handler to test for the name of the element clicked using an if-then-else block and act accordingly. You can take a look at a demo project I posted a few weeks ago for an example: PictureWindows


Thanks, jonn8

I see how you did that in your project. In mine I have a button the triggers the onclick.

As if you had your 4 radio buttons and a CHANGE COLOR NOW! button below them. I don’t want the radio buttons to actually cause an event.

Does that make sense?


So don’t assign any events to the radio buttons. When you click the button test for which row (or column) of the matrix is selected and act accordingly:


Thanks for that - got it!