How to know if a radio button is selected or not?
Mostrar comentarios más antiguos
Dear all,
I have one GUI with 4 Radio Buttons and one Push Putton. All of them are in one Button Group.
I want, if the user didn't select any radio button, then the Push Button will do code-A, and if the user selected any of the radio buttons, then the Push Button will do code-B.
Any idea how to do that?
The code below is in my Push Button Function
if
%user did not select any radio button, then do this
else
%do this if a user selected a radio button
switch get(get(handles.uipanel4,'SelectedObject'),'Tag')
case 'radiobutton5', line_type = 'imline';
case 'radiobutton6', line_type = 'impoint';
case 'radiobutton7', line_type = 'imfreehand';
case 'radiobutton8', line_type = 'impoly';
end
Any suggestion will be appreciated.
Thank you.
Meshoo
1 comentario
nl2605
el 20 de Mzo. de 2014
The pushbutton is also in the button group?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Build Interactive Tools en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!