inputsdlg: Enhanced Input Dialog Box
编者注: This file was selected as MATLAB Central Pick of the Week
This function is an enhanced version of the standard INPUTDLG function with many additional features:
- 8 control types: text, edit, check, list, range, color, table, button
(**color, table, and button were added in v2.0**)
- Text Type is a static text (e.g., to place an instruction)
- Check Type displays a checkbox with a label, returns one of two values. Value could be logical, integer, or string
- Edit Type can be configured to accept:
* plain text (single- or multi-line mode)
* date (following date formats as defined in DATESTR)
* numeric value (integer or float with attribute specification)
* file or directory name (with UIGETFILE, UIPUTFILE, or UIGETDIR functions, supports UIGETFILE multi-sel
ect mode)
* vector (can specify the length of the vector or the attributes of its elements if the length is fixed or arbitrary). To specify a row vector, include the 'row' keyword in formats.limits field.
- List Type returns index(es) of the selected item and can have 4 different appearances:
* Popupmenu
* Listbox (can be made to multi-select)
* Radiobutton (button placements can be customized)
* Togglebutton (button placements can be customized)
- INPUTSDLG can automatically size controls and dialog box for an optimal appearance, and control's size can be made to auto-adjust if dialog is made resizable.
- INPUTSDLG supports user callbacks to all UI controls as well as dialog's CreateFcn and DeleteFcn callbacks. The callback function takes additional input arguments to standard MATLAB callback arguments.
- INPUTSDLG returns the user entries in a cell or in a structure
- INPUTSDLG is backward compatible with INPUTDLG except for its returned values when canceled. With default answers given, INPUTDLG returns an empty cell while INPUTSDLG returns the default answers. INPUTSDLG returns the second parameter, CANCELED(a logical flag) to indicate how the dialog box is terminated.
ACKNOWLEDGMENT:
- Luke Reisner prepared v1.3 and kindly shared his modification/bug fixes.
- Florian Hatz initiated the development of v2.0 with his ideas of adding table, color, and tiling option
引用格式
Kesh Ikuma (2024). inputsdlg: Enhanced Input Dialog Box (https://www.mathworks.com/matlabcentral/fileexchange/25862-inputsdlg-enhanced-input-dialog-box), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- AI and Statistics > Text Analytics Toolbox >
- MATLAB > App Building > Migrate GUIDE Apps > Dialog Boxes >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
2.3.2.0 | Bug fix on list control's default value processing |
||
2.3.1.0 | Bug fixes in default value processing |
||
2.3.0.0 | - Allows a row vector with edit:vector format.
|
||
2.2.0.0 | * Added support for 'text' format with 'check' type
|
||
1.23.0.0 | v.2.1.2
|
||
1.22.0.0 | bug fix & extended compatibility to pre-R2011b |
||
1.21.0.0 | v2.1b - same day bug fixes #2 |
||
1.20.0.0 | v2.1a (same day bug fixes) |
||
1.19.0.0 | v.2.1.0 (Jul 03, 2014)
|
||
1.18.0.0 | v2.0.6 - bug fixes
|
||
1.17.0.0 | updated title |
||
1.16.0.0 | * Improved error message on FORMATS-PROMPT size mismatch.
|
||
1.15.0.0 | Bug fix: parsing empty callback format field (Thanks David!) |
||
1.14.0.0 | v2.0.3: bug fix release |
||
1.13.0.0 | Made compatible with pre-R2013a releases |
||
1.12.0.0 | Bug fix release |
||
1.11.0.0 | v.2.0 (T. Ikuma & F. Hatz)
|
||
1.10.0.0 | v1.3 (by Luke Reisner)
|
||
1.9.0.0 | v1.2.3
|
||
1.8.0.0 | v.1.2.2 (July 15, 2010)
|
||
1.7.0.0 | Bug Fix: Default Options bug reported by Jason |
||
1.6.0.0 | * Fixed a couple bugs
|
||
1.5.0.0 | (v.1.12) More bug fixes |
||
1.4.0.0 | v1.11
|
||
1.3.0.0 | v1.1 (Nov. 19, 2009)
|
||
1.0.0.0 |