uispinner
Create spinner component.
📝Syntax
h = uispinner()
h = uispinner(parent)
h = uispinner(..., propertyName, propertyValue)
📥Input Arguments
Parameter Description
parent parent container.
propertyName, propertyValue name-value pairs.
📤Output Arguments
Parameter Description
h UI component object.
📄Description

spn = uispinner creates a numeric spinner. Properties: Value, Step, Limits, LowerLimitInclusive/UpperLimitInclusive, RoundFractionalValues, ValueDisplayFormat, AllowEmpty, Editable, ValueChangedFcn, ValueChangingFcn.

💡Examples
Captured UI component for the help image.
f = uifigure('Visible', 'off', 'Name', 'Spinners', 'Position', [100 100 460 280]);
uilabel(f, 'Text', 'Quantity', 'FontWeight', 'bold', 'Position', [80 185 100 24]);
qty = uispinner(f, 'Value', 8, 'Step', 1, 'Limits', [0 20], 'Position', [210 180 130 30]);
uilabel(f, 'Text', 'Ratio', 'FontWeight', 'bold', 'Position', [80 130 100 24]);
ratio = uispinner(f, 'Value', 0.75, 'Step', 0.05, 'Limits', [0 1], 'Position', [210 125 130 30]);
drawnow();
Example illustration
uispinner
f = uifigure();
spn = uispinner(f, 'Value', 5, 'Step', 0.5, 'Limits', [0 10]);
🔗See Also
uifigure
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub