does someone know if it's possible to have popupmenu in inputdlg?

9 views (last 30 days)
I am familiar with the use of inputdlg but unfortunately the input fields accept only text and numbers! does someone know if it's possible to have popupmunu or listbox so I can select among a list of possible inputs?
Thank you, Aleksandar
Aleksandar Petrov
Aleksandar Petrov on 8 Sep 2017
yes, I can program a dialog box but the problem is that in my entire GUI I use inputdlg to input parameters so the style of all input dialog is the same. when I program my own dialog it differs a lot from the others. not only the position where they appear but also the font style, the distance between lines and so on. maybe if I know the default parameter of the inputdlg I could program by myself exactly the same style dialog. Thank you, Aleksandar

Sign in to comment.

Accepted Answer

Joseph Cheng
Joseph Cheng on 8 Sep 2017
Edited: Joseph Cheng on 8 Sep 2017
Absolutely you can, however its not as straight forward as inputdlg() or questdlg(). you'll want to look at the example here:
which is pretty much the same example i was about code out for you.
Joseph Cheng
Joseph Cheng on 8 Sep 2017
if you cannot find the private functions, put a breakpoint in inputdlg, then use the "which" function
which setdefaultbutton
which getnice....
button to find the files to paste into the bottom of the popupdlg function you'll be creating.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 8 Sep 2017
Perhaps you'd be interested in listdlg() which gives a listbox. Or menu() which gives a bunch of buttons.

Community Treasure Hunt

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

Start Hunting!