spinedit
spinedit is an easy way to implement an edit with a slider attached to it to allow easy adjustment of numerical values in GUIs.
This package groups the two uicontrol components together and takes care of their callbacks, resulting in a kind of new uicontrol type named spinedit.
The zip file contains
- spinedit.m (the creation routine including the callback)
- spineditSetValue.m (a routine to set the value property to both components.)
Example of usage:
% define the spinedit
h = spinedit('position', [0.5 0.5 0.3 0.1], 'backgroundcolor', 'w', 'precision', '%6.4f');
% set an initial value
spineditSetValue(h, 0.5)
% somewhere later: get the value
val = get(h, 'value')
Cite As
Andreas Gäb (2024). spinedit (https://www.mathworks.com/matlabcentral/fileexchange/11834-spinedit), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | Implemented user-defined callback. |