h = uieditfield()
h = uieditfield(parent)
h = uieditfield(..., propertyName, propertyValue)
| Parameter | Description |
|---|---|
| parent | parent container. |
| propertyName, propertyValue | name-value pairs. |
| Parameter | Description |
|---|---|
| h | UI component object. |
ef = uieditfield creates a text edit field; uieditfield(parent, 'numeric') creates a numeric edit field. Text style: Value (char), CharacterLimits, InputType, ValueChangingFcn. Numeric style: Value (double), Limits, LowerLimitInclusive/UpperLimitInclusive, RoundFractionalValues, ValueDisplayFormat, AllowEmpty. Both: Editable, HorizontalAlignment, Placeholder, ValueChangedFcn.
f = uifigure('Visible', 'off', 'Name', 'Edit fields', 'Position', [100 100 420 260]);
ef = uieditfield(f, 'Position', [95 135 230 24]);
ef.Value = 'Sample text';
nf = uieditfield(f, 'numeric', 'Position', [95 90 120 24]);
nf.Value = 42.5;
drawnow();
f = uifigure();
ef = uieditfield(f, 'Value', 'hello');
nef = uieditfield(f, 'numeric', 'Limits', [0 100], 'Value', 42);
| Version | Description |
|---|---|
| 2.0.0 | initial version |