from
Increment/Decrement uicontrol
by Chad Gilbert
A custom uicontrol for making increment/decrement button pairs.
|
| example.m |
%% Example
% This example shows how to add a working increment/decrement button set to a
% MATLAB GUI using incrementdecrement.m.
% Create the GUI/figure window.
f = figure('Position', [100 100 200 200]);
% Create the uicontrol to be assoviated with thte buttons.
lbl = uicontrol( ...
'Style' , 'Edit', ...
'Enable' , 'off', ...
'Units' , 'Points', ...
'Position', [30 5 100 40], ...
'Value' , 0, ...
'Fontsize', 16);
% Create the buttons.
grp = incrementdecrement(lbl);
print -dpng example.png
|
|
Contact us