How Enable and disable panel by popup menu selections
조회 수: 9 (최근 30일)
이전 댓글 표시
In my program i want to do following in GUI
i select first option from popup menu at same time panel_1 is enable and panel_2 is disable
when i select another option at that time panel_1 is disable and panel_2 is enable
댓글 수: 1
Eric Sargent
2020년 12월 9일
As of R2020b ButtonGroup and Panel both support Enable when the button group or panel is parented to a uifigure.
답변 (3개)
Walter Roberson
2012년 7월 29일
uipanel cannot be enabled or disabled: they can just be set to be visible or not.
switch get(hObject, 'Value')
case 1:
set(handles.panel_1, 'Visible', 'on');
set(handles.panel_2, 'Visible', 'off');
case 2:
set(handles.panel_1, 'Visible', 'off');
set(handles.panel_2, 'Visible', 'on');
end
댓글 수: 0
Lukasz Pater
2016년 11월 28일
Parameter Enable for popup menu control:
- on - regular menu
- off - menu blocked with grey background
- inactive - menu blocked without grey background
댓글 수: 1
Walter Roberson
2016년 11월 28일
That is correct for uicontrol style popup . It does not apply for uipanel
Eric Sargent
2020년 12월 9일
As of R2020b ButtonGroup and Panel both support Enable when the button group or panel is parented to a uifigure.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop uifigure-Based Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!