Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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: 5
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." <roberson@hushmail.com> 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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.