MATLAB Answers


Radio Button and Panel GUIDE

Asked by Melvin
on 24 Feb 2012
Latest activity Commented on by asma arafat on 16 May 2017

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 Comment

the panel---i mean a panel you created on a only two objects are present on the gui. The radio button and a panel...thank you

Log in to comment.


1 Answer

Answer by G A
on 24 Feb 2012

if (get(hObject,'Value') == get(hObject,'Max'))

set (handles.my_uipanel,'Visible','on');


set (handles.my_uipanel,'Visible','off');



what changes have you made?

Instead of checking for Value 1 or 0 (true or false), for radio button you have to check for Value 'Max' or 'Min'

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

Log in to comment.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!