spinedit

An edit control with an attached slider to adjust numerical values.
786 Downloads
Updated 7 Aug 2006

View License

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
Created with R2006a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Migrate GUIDE Apps in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Implemented user-defined callback.