User`s guide

Add Components to a Programmatic GUI
Specify the value indicated by the slider when it is created by setting the
Value property to the appropriate number. This number must be less than
or equal to
Max and greater than or equal to Min.IfyouspecifyValue
outside the specified range, t he slider is not d isplayed.
The slider
Value changes by a small amount w hen a user clicks the arrow
button, and changes by a larger amount when the user clicks the trough
(also called the channel). Control how the slider responds to these actions
by setting the
SliderStep property. Specify SliderStep as a two-element
vector,
[minor_step m ajor _step],whereminor_step is less than or
equal to
major_step. Because specifying very small values can cause
unpredictable slider behavior, make both
minor_step and major_st ep
greater than 1e-6.Setmajor_step to the proportion of the range that
clicking the trough m oves the slider thumb. Setting it to
1 or higher causes
thethumbtomoveto
Max or Min w hen the trough is clicked.
As
major_step increases, the thumb grows longer. When major_step is
1, the thumb is half as long as the trough. When
major_step is greater
than 1, the thumb continues to g row, slowly approaching the full length of
the trough. When a slider s erves as a scroll bar, you can uses this behavior
to indicate how much of the document is currently visible by changing the
value of
major_step.
Arrow button
(minor_step)
Trough
(major_step)
If you w ant to set the location or size of the component to an exact value,
then modify its
Position property.
The example provides a 5 percent minor step and a 20 percent major step.
The default
major_step and mino r_step, [ 0.01 0.10],providesa1percent
minorstepanda10percentmajorstep.
The
Position property specifies the location and size of the slider. In this
example, the slider is 150 pixels wide and 30 h igh. It is positioned 30 pixels
from the left of the figure and 20 pixels from the bottom. The statement
assumes the default value of the
Units property, which is pixels.
11-29