Code covered by the BSD License  

Highlights from
SPINNER

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 7.69 KB File ID: #5881

SPINNER

by Steve Simon

 

15 Sep 2004 (Updated 17 Sep 2004)

Create a simple spinner control using 3 uicontrols.

| Watch this File

File Information
Description

SPINNER creates a simple 'spinner' control, using an edit window and 2 pushbuttons.

This includes an example GUI (SPINNERGUI) that uses two spinners together.

Here's the online help:

 SPINNER create a 'spinner' from an edit box and two pushbuttons
  SPINNER(PROP1,VAL1,PROP2,VAL2,...) creates the spinner with the specified
   property values.
   Properties:
     Position : pixel position rectangle, default [20 20 60 20]
     Min : minimum value, default 0
     Max : maximum value, default 1
     StartValue : initial value, default 1
     Step : increment value, default 0.1
     Callback : callback (can be a string, function handle,
                or cell array with a function handle), default ''
     Tag : name for spinner object.
  H = SPINNER returns the handle for the edit box that contains the value.
   Access it's String or Value property to get the string or value from the
   'spinner'.
  [H,H2] = SPINNER returns the handles for the pushbuttons in H2.
  S = SPINNER(OBJ) returns the spinner data for the figure. If there are
   multiple spinners in the figure, then passing in the figure handle will
   return an array of structures. Passing in the handle of one of the
   uicontrols that comprise a particular spinner will return the structure
   for that spinner only.
 
  Example:
  
     fig = figure;
     h = spinner('Parent',fig,...
                 'Position',[100 100 60 40],...
                 'Min',0,...
                 'Max',1000000,...
                 'StartValue',1,...
                 'Step',100,...
                 'Callback',@(h,e));

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
gui tools Steve Simon 22 Oct 2008 07:31:33
example Steve Simon 22 Oct 2008 07:31:33
gui Steve Simon 22 Oct 2008 07:31:33
spinner Steve Simon 22 Oct 2008 07:31:33
control Steve Simon 22 Oct 2008 07:31:33
edit Steve Simon 22 Oct 2008 07:31:33
window Steve Simon 22 Oct 2008 07:31:33

Contact us at files@mathworks.com