|
Naveenarjuna wrote:
> i want to create two panels, If i select one option through popup
> menu i want to display one panel...If i select another option in popup
> menu i want display another panel..
> I am trying like below code
>
> switch get(handles.popupmenu,'value')
> case 1
> set(handles.uipanel1,'visible','on');
> set(handles.uipanel2,'visible','off');
> case 2
> set(handles.uipanel1,'visible','off');
> set(handles.uipanel2,'visible','on');
> end
>
> Am not getting....
I do not see anything obviously wrong with that. What are you seeing
when you use this code?
The one thing I might suggest is that since this is probably in the
callback for the popupmenu, that you should replace handles.popupmenu by
src, as in
switch get(src, 'value')
In a callback, src always refers to the current control whose callback
is being invoked.
|