How can i get a popup from a push button?

8 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by