The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: GUI - Turn on multiple radio buttons with one click
Replies: 5   Last Post: Apr 15, 2013 10:06 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jerry Gregoire

Posts: 10
Registered: 3/30/11
Re: GUI - Turn on multiple radio buttons with one click
Posted: Apr 15, 2013 10:06 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Think blue, count two." <> wrote in message <nvX2p.9969$lO1.4037@newsfe11.iad>...
> On 04/02/11 12:08 PM, Braydon wrote:
> > I have a Matlab GUI with 10 radio buttons and one push button. When the
> > Matlab GUI starts, no radio buttons are selected.
> >
> > Is there a way to make it so if the user presses a push button, 6
> > specific radio buttons are shown as selected on the GUI?

> If these buttons are inside a buttongroup, then No.
> If they are independent buttons, then just set() the vector of handles
> to 'Value', 1 for the ones you want on, and the vector of the remaining
> handles to 'Value' 0 for the ones you want to turn off.

Had the same question. You could use check boxes instead. Works great.
hButton(button_i) = uicontrol('Style','checkbox','String', name, 'parent',h, ...
'HandleVisibility','on', ...
'pos', [Col(button_i), Row(button_i), ButtonXSize, ButtonYSize], ...
'visible', 'on');

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.