LimitScope

バージョン 1.0.0.0 (8.34 KB) 作成者: Celso Reyes
adds scope-dependency to graphical handle objects. They can be deleted, or have changing properties
ダウンロード: 7
更新 2018/4/9

ライセンスの表示

This was born out of the need to have information dialog boxes that appear and eventually disappear, without necessarily blocking, as with uiwaitfor. Using LimitScope, you can display some graphical item, whether it is a messagebox (figure), axes, plot, or even a menu item, and have it delete itself when the variable is no longer used. That is, when the variable becomes invalid or changes (such as when you leave a function, or when you assign a new value to the variable).
An alternate use of this allows you to change properties for an item depending on scope. Some ideas:
- uimenu items that are only enabled while a function is executing
- highlights on a plot that display during certain calculations
- visible/hidden buttons on a message box

Example 1. A self-deleting message box
function calculate()
LimitScope( msgbox('Calculating important stuff','calc') );
% do calculations...
end

Example 2. Message box that goes away after a few seconds
LimitScope(msgbox('Hey, that thing is done', 'look'), seconds(3) );

Example 3. Plot a line that changes color momentarily
tmp=LimitScope(plot(1:10,1:10),'Color','red','black',seconds(1));

引用

Celso Reyes (2025). LimitScope (https://www.mathworks.com/matlabcentral/fileexchange/66838-limitscope), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R2017b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersGraphics Object Properties についてさらに検索
タグ タグを追加

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0