How can i get a popup from a push button?

7 ビュー (過去 30 日間)
Andy
Andy 2011 年 9 月 6 日
How can i get another GUI to popup after i press a push button? So when i press the push button, a popup box will come up and the user can input things (numbers), which then will be fed into the main program. If this possible, does anyone know of any work arounds? Thanks

回答 (1 件)

Walter Roberson
Walter Roberson 2011 年 9 月 6 日
See inputdlg()
If you want to get fancier than that, you can create a figure (make its 'WindowStyle' to 'modal' if you want) and put whatever GUI elements you want in it.
Sometimes it is useful to create the input dialog ahead of time, and set its 'Visible' property to 'off'; then the callback for the pushbutton might be as simple as setting the figure to be visible.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by