enable/disable entire figure window

버전 1.5.0.0 (6.86 KB) 작성자: Yair Altman
enable/disable entire figure window, including toolbar, menubar, frame and all contents
다운로드 수: 5.1K
업데이트 날짜: 2016/12/11

라이선스 보기

Syntax:
currentState = enableDisableFig(hFig, newState)

Description:
enableDisableFig sets the figure hFig's enable/disable state, which is otherwise supported by Matlab only for specific components but not figures. Using this function, the entire figure window, including all internal menus, toolbars and components, is enabled/disabled in a single call. Valid values for newState are true, false, 'on' & 'off' (case insensitive). hFig may be a list of figure handles.

Note 1: when the state is enabled, internal figure components may remain disabled if their personal 'enabled' property is 'off'.

Note 2: in disabled state, a figure cannot be moved, resized, closed or accessed. None of its menues, toolbars, buttons etc. are clickable.

enableDisableFig(newState) sets the state of the current figure (gcf).

state = enableDisableFig(hFig) returns the current enabled/disabled state of figure hFig, or of the current figure (gcf) if hFig is not supplied. The returned state is either 'on' or 'off'.

Examples:
state = enableDisableFig;
state = enableDisableFig(hFig);
oldState = enableDisableFig(hFig, 'on');
oldState = enableDisableFig(hFig, result>0);
oldState = enableDisableFig(true); % on current figure

Technical description:
http://UndocumentedMatlab.com/blog/disable-entire-figure-window

Bugs and suggestions:
Please send to Yair Altman (altmany at gmail dot com)

Warning:
This code heavily relies on undocumented and unsupported Matlab functionality. It works on Matlab 7+, but use at your own risk!

인용 양식

Yair Altman (2024). enable/disable entire figure window (https://www.mathworks.com/matlabcentral/fileexchange/15895-enable-disable-entire-figure-window), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.5.0.0

Fix for 'on'/'off' on new Matlab releases

1.4.0.0

Fix for HG2 (R2014+)

1.3.0.0

Fix for R2011b; fixed description

1.2.0.0

Removed warning messages that appeared in modern Matlab releases

1.0.0.0