VerticalSlider

VerticalSlider[y]

represents a vertical slider at position y with range 0 to 1.

VerticalSlider[Dynamic[y]]

takes the position to be the dynamically updated current value of y, with the value of y being reset if the slider is moved.

VerticalSlider[y,{ymin,ymax}]

represents a vertical slider with range ymin to ymax.

VerticalSlider[y,{ymin,ymax,dy}]

represents a vertical slider that jumps in steps dy.

VerticalSlider[y,{{e1,e2,}}]

represents a slider in which equally spaced intervals correspond to successive settings ei.

VerticalSlider[y,{{{e1,h1},{e2,h2},}}]

uses intervals of relative heights hi for the ei.

Details and Options

  • VerticalSlider[] displays in a notebook as a vertical slider that can be manipulated interactively.
  • VerticalSlider[Dynamic[y]] will reset the value of y when the slider is moved; VerticalSlider[y] will not.
  • VerticalSlider[n,{nmin,nmax,dn}] jumps to integer positions if nmin and dn are integers. »
  • VerticalSlider[y,{ymin,ymax,dy}] in general jumps to positions given by Range[ymin,ymax,dy]. »
  • VerticalSlider[y] represents a slider running from value 0 at the bottom to value 1 at the top.
  • VerticalSlider[y,{ymax,ymin}] with ymax>ymin represents a slider running from value ymin at the top to value ymax at the bottom. »
  • If the value of the slider is outside the range given, it will be displayed at one of the ends.
  • VerticalSlider[y,{0,1,dy}] displays at position y, even if this is not a multiple of dy.
  • In VerticalSlider[y,{{e1,e2,}}], the ei can be any expressions, not just numbers.
  • The following options can be given:
  • AppearanceAutomaticthe overall appearance of the slider
    AutoActionFalsewhether to move the slider automatically when the mouse is over it
    BaselinePositionAutomaticalignment relative to surrounding text
    BaseStyle{}base style specifications for the slider
    ContinuousActionTruewhether to update continuously when the slider is moved
    EnabledAutomaticwhether the slider is enabled, or grayed out
    ImageMargins0margins around the image of the displayed slider
    ImageSizeAutomaticthe overall image size of the displayed slider
  • Possible settings for Appearance include Tiny, Small, Medium, and Large, as well as typically some other settings such as "LeftArrow" and "RightArrow".
  • VerticalSlider[] is equivalent to VerticalSlider[0.5].
  • The settings for BaseStyle are appended to the default style typically given by the "VerticalSlider" style in the current stylesheet.

Examples

open allclose all

Basic Examples  (2)

A vertical slider set at 0.8 in the default range 0 to 1:

Dynamically change the value of :

Scope  (3)

Specify integer values only:

Use the range to , increasing when going from bottom to top:

A vertical slider with range to , increasing when going from top to bottom:

Use rational steps:

Use increments of :

Options  (14)

Appearance  (3)

Different appearance sizes:

Add a label:

Different appearances for the slider thumb are available on some platforms:

AutoAction  (1)

Change the value by moving the mouse over the slider area:

Background  (2)

Change the background color:

Change the background color dynamically:

BaselinePosition  (1)

Align with surrounding text:

ContinuousAction  (1)

By default, variables are continuously updated:

Setting ContinuousAction to False updates the variable only when the slider is released:

Enabled  (1)

By default, VerticalSlider is enabled:

By setting Enabled->False, the slider is disabled but visible in its current state:

Exclusions  (1)

Exclude values from the range of the slider:

ImageMargins  (1)

Add margins to the slider area:

ImageSize  (3)

Use preset values:

Use any height value and default width:

A fully customized image size:

Applications  (1)

A color selector:

Properties & Relations  (1)

VerticalSlider is equivalent to Slider with a vertical appearance:

Possible Issues  (1)

Appearances provided by the operating system may be different or unavailable on other platforms:

Generic appearances are available on all platforms:

Introduced in 2007
 (6.0)