"Dustin" wrote in message <kg8hin$p5t$1@newscl01ah.mathworks.com>...> I'm pretty new to Matlab and totally new to GUI making, and need to know how to make an if statement in a checkbox function that makes a panel visible. So, if the checkbox is checked or unchecked, it checks if a specific panel is invisible or visible, and makes it visible I'm just not sure how to word it. The following code (which doesn't work since I don't know what I'm doing) should illustrate what I would like to do:> > function CheckBox1_Callback(hObject, eventdata, handles)> if Panel1 == ('Visible','off')> set(handles.PanelQ2,'Visible','on')> end> > Thanks ahead of time for the help!> Dustin

Looks like you've almost got it.The if statement should look like : if strcmp(get(Panel1,'visible'),'on')

You probably also want an outer if statement that checks if the checkbox is checked or unchecked: