Can I make MENU nonmodal

Hi All,
I've created a small application with a GUI built using the MENU function. MENU creates modal menu dialog boxes. Since then I realised the user will need to occassionally access the workspace window and variable editor. Currently the user is forced to shut down the application each time they need to inspect a variable (when not in debug mode) because the menus are modal.
Is there any way of making MENU nonmodal? At this stage I'd rather not rebuild my GUI using other methods if at all possible.
Thanks for the help,
Andrew

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 3 月 5 日

1 投票

menu() is not modal. It does have a waitfor() inside it, so menu() itself does not return until the figure dies, but other callbacks can take place while the menu is showing. So if you toss in another figure, you can have a button on it that calls "keyboard".

2 件のコメント

Andrew
Andrew 2013 年 3 月 13 日
Okay thanks. I'm unfamiliar with figures, buttons and callbacks. How do I use another figure with a button that calls the keyboard (i.e. command window and variable explorer? Thanks for the help.
Walter Roberson
Walter Roberson 2013 年 3 月 13 日
fig2 = figure('Units', 'pixel', 'Position', [20 600 50 20]); %guess
but = uicontrol('Style', 'push', 'Units', 'normal', 'Position', [0 0 1 1], 'String', 'K>', 'Callback', 'keyboard', 'Parent', fig2);

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeUpdate figure-Based Apps についてさらに検索

タグ

質問済み:

2013 年 3 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by