More dialogs than you can shake a stick at
I’m going to continue mydialog discussionfrom two weeks ago with more of the MATLAB dialog gallery. I feel a bit like a car salesman, we’ve got so many dialogs to choose from. I’ve grouped them into two categories: dialogs for messages, and dialogs for setting/getting things.
The first group is themsgboxand it’s specialized variants:warndlg,errordlg, andhelpdlg. Msgbox is a basic dialog that presents a message to the user with an “OK” button. The warning, error, and help dialogs are all special cases of msgbox with the icon pre-chosen:
warndlg
helpdlg
The second group provides common dialogs that are either system, Java, or Handle Graphics based, depending on the dialog and platform. These are dialogs for dealing with files, printing, and picking fonts and colors.
File Picker(s)
uigetfile,uiopen, anduigetdirare all file/folder browsers for selecting a file from the system and returning the result to MATLAB. Theuiputfileanduisaveare for selecting files for saving as determined by whatever your program wants (uiputfile) or for saving workspace variables (uisave).
Here’s what they look like on Windows and MAC
Setting Fonts and Colors
有时你想要礼物chooser with a dialog specialized for selecting a complex data type. We’ve provided two dialogs: one for selecting fontsuisetfont, and one for selecting a coloruisetcolor.
I didn’t coverprintdlgandprintpreviewwhich are dialogs for printing MATLAB figure windows. I recommend checking them out on your own. There’s also a progressbarwaitbar:
If all these predefined UI’s aren’t enough for you, check out theMATLAB file exchange. Last week’s pick of the week wasSTRUCTDLG, a dialog for editing the fields of a struct. This week they’ll highlight another submission in the same vein.
- Category:
- MATLAB GUI
Comments
To leave a comment, please clickhereto sign in to your MathWorks Account or create a new one.