Radio Button and Panel GUIDE
Mostrar comentarios más antiguos
What code should i write under a callback of the radio button when you want to click a radio button, the visibility of the panel is being controlled. Radio button clicked, Panel appears. Radio Button unclick, panel hides...what do you think? Thank you everyone
1 comentario
Melvin
el 24 de Feb. de 2012
Respuestas (1)
G A
el 24 de Feb. de 2012
0 votos
if (get(hObject,'Value') == get(hObject,'Max'))
set (handles.my_uipanel,'Visible','on');
else
set (handles.my_uipanel,'Visible','off');
end
8 comentarios
Melvin
el 24 de Feb. de 2012
Melvin
el 24 de Feb. de 2012
G A
el 24 de Feb. de 2012
may be you have to use this line:
if (get(hObject,'Value') == get(hObject,'Max'))
"Radio buttons set Value to Max when they are on (when selected) and Min when off (not selected)."
http://www.mathworks.co.uk/help/techdoc/creating_guis/f16-999044.html#f16-1003665
Melvin
el 24 de Feb. de 2012
G A
el 24 de Feb. de 2012
I have edited the code above
Melvin
el 25 de Feb. de 2012
G A
el 27 de Feb. de 2012
Instead of checking for Value 1 or 0 (true or false), for radio button you have to check for Value 'Max' or 'Min'
asma arafat
el 16 de Mayo de 2017
hello, i want to show panel with some texts when i click push button only and hide it when i am not click it. any help? thanks
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects 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!