how can i give the appearnce as dimmed to gui panel?

조회 수: 3 (최근 30일)
Raman
Raman 2013년 6월 26일
i've 3 panels in my gui and each panel contain sone buttons,edit boxes and static text and so on....
i want when panel 1 is enabled the other two panels take the apperance of dimmed one...
i used the command:
set(handles.uipanel1,'visible','on');
set(handles.uipanel2,'visible','off');
set(handles.uipanel3,'visible','off');
what it does is it enables the panel 1 and totally disable the next two i.e it removes the appearance from the gui... i want the other two panels i.e panel 2 and panel 3 remain as such but in dimmes appearance..
like if we right click on desktop, then the popup menu occurs has the option PASTE and PASTE SHORTCUT are in dimmed appearance....
can u tell me which piece of code should i use in order to get the output as i require....
plz help me...........

답변 (3개)

Jan
Jan 2013년 6월 26일
You set the 'Visibility' to 'off' and in consequence the object is not visible anymore. Most likely you want to disable the objects only, such that the 'Enable' property is suiting. I assume you have to disable the children of the panel, not the panel itself:
ChildList = get(handles.uipanel2, 'Children');
set(ChildList, 'Enabled', 'off');
  댓글 수: 4
Raman
Raman 2013년 6월 29일
i already tried this.... panel does not having the property named enable...
Jan
Jan 2013년 6월 30일
@Jassy: Oh, sorry. What should the "disabling" of a panel do?

댓글을 달려면 로그인하십시오.


KIRAN kumar
KIRAN kumar 2013년 6월 29일
try in the mfile which is generated after processing the fig file

Matthew Eicholtz
Matthew Eicholtz 2013년 6월 29일
As for dimming the panel itself, will changing the 'BackgroundColor' property suffice for you? For example, the following code will darken the panel by 10%.
clr = get(handles.uipanel2,'BackgroundColor');
set(handles.uipanel2,'BackgroundColor',0.9*clr);

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by