({{, (RefLink[Slider2D, paclet:ref/Slider2D])[{x,y}]
represents a 2D slider with settings x and y in the range 0 to 1. }, {, (RefLink[Slider2D, paclet:ref/Slider2D])[(RefLink[Dynamic, paclet:ref/Dynamic])[pt]]
takes the setting to be the dynamically updated current value of pt, with the value of pt being reset if the slider is moved. }, {, (RefLink[Slider2D, paclet:ref/Slider2D])[pt,{min,max}]
represents a 2D slider with range min to max in each direction. }, {, (RefLink[Slider2D, paclet:ref/Slider2D])[pt,{min,max,d}]
represents a 2D slider that jumps in steps d in each direction. }, {, (RefLink[Slider2D, paclet:ref/Slider2D])[pt,{{(Subscript[x, min]),(Subscript[y, min])},{(Subscript[x, max]),(Subscript[y, max])}}]
specifies different ranges in x and y directions. }, {, (RefLink[Slider2D, paclet:ref/Slider2D])[pt,{{(Subscript[x, min]),(Subscript[y, min])},{(Subscript[x, max]),(Subscript[y, max])},{dx,dy}}] 
uses jumps dx, dy.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[Slider2D, paclet:ref/Slider2D])[…] displays in a notebook as a 2D slider that can be manipulated interactively, and moved in both horizontal and vertical directions.

(RefLink[Slider2D, paclet:ref/Slider2D])[(RefLink[Dynamic, paclet:ref/Dynamic])[pt]] will reset the value of pt when the slider is moved; (RefLink[Slider2D, paclet:ref/Slider2D])[pt] will not.

(RefLink[Slider2D, paclet:ref/Slider2D])[pt,{(Subscript[n, min]),(Subscript[n, max]),dn}] jumps to integer positions if (Subscript[n, min]) and dn are integers.

(RefLink[Slider2D, paclet:ref/Slider2D])[pt,{(Subscript[r, min]),(Subscript[r, max]),dr}] in general jumps to positions given by (RefLink[Range, paclet:ref/Range])[(Subscript[r, min]),(Subscript[r, max]),dr].

In (RefLink[Slider2D, paclet:ref/Slider2D])[pt,{{(Subscript[x, min]),(Subscript[y, min])},{(Subscript[x, max]),(Subscript[y, max])},{dx,dy}}], dx or dy can be 0, indicating that settings in the corresponding direction should be continuous.

The coordinates in (RefLink[Slider2D, paclet:ref/Slider2D]) run in the same directions as the default for (RefLink[Graphics, paclet:ref/Graphics]), with x running from left to right, and y running from bottom to top.

(RefLink[Slider2D, paclet:ref/Slider2D])[pt,{{(Subscript[x, min]),(Subscript[y, max])},{(Subscript[x, max]),(Subscript[y, min])}}] with (Subscript[y, max]) > (Subscript[y, min]) represents a 2D slider with y running from top to bottom.

If the value of the 2D slider is outside the ranges given, it will be displayed at one of the sides.

The following options can be given:

(RefLink[Appearance, paclet:ref/Appearance])->"Labeled" displays the current values of the slider as editable labels.

The settings for (RefLink[BaseStyle, paclet:ref/BaseStyle]) are appended to the default style typically given by the "Slider2D" style in the current stylesheet.

(RefLink[Slider2D, paclet:ref/Slider2D])[] is equivalent to (RefLink[Slider2D, paclet:ref/Slider2D])[{0.5,0.5}].

OpenersPrimaryExamplesSection(Spacer1)Examples  (22)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

A particular 2D slider setting:

Slider2D[{.7,.3}]

Dynamically update the slider setting:

{Slider2D[Dynamic[r]],Dynamic[r]}

OpenersExampleSection1(Spacer1)Scope  (3)

Define a range:

{Slider2D[Dynamic[x],{{-4,-1},{4,1}}],Dynamic[x]}

Define a range and step size:

{Slider2D[Dynamic[y],{{-4,-1},{4,1},{2,0.25}}],Dynamic[y]}

Use (MenuGrayLink[Evaluate in Place, paclet:ref/menuitem/EvaluateInPlace]) to get an active 2D slider:

Setting[Slider2D[]]

Then evaluate (RefLink[Setting, paclet:ref/Setting]) to get the actual value out:

Setting[]

OpenersExampleSection2(Spacer1)Options  (12)

OpenersExampleSubsection0(Spacer1)Appearance  (2)

Different sizes:

Table[Slider2D[{0.5,0.5},Appearance -> a],{a,{Tiny,Small,Medium,Large}}]

Add a label:

Slider2D[{0.5,0.5},Appearance -> "Labeled"]

OpenersExampleSubsection1(Spacer1)AutoAction  (1)

Values will change as the cursor moves over the slider:

{Slider2D[Dynamic[x],AutoAction->True],Dynamic[x]}

OpenersExampleSubsection2(Spacer1)Background  (2)

Set the background color:

Table[Slider2D[{0.5,0.5},ImageMargins->10,Background->c],{c,{Pink,Green,Gray,Yellow}}]

Change the background dynamically:

Slider2D[Dynamic[x],ImageMargins->10,Background->Dynamic[Hue@@x]]

OpenersExampleSubsection3(Spacer1)BaselinePosition  (1)

Set the baseline for alignment with surrounding text:

Row[Table[Slider2D[{0.5,0.5},BaselinePosition->p],{p,{Bottom,Center,Top}}],"xxx"]

OpenersExampleSubsection4(Spacer1)ContinuousAction  (1)

By default, settings are changed continuously as the controller is affected:

{Slider2D[Dynamic[x]],Dynamic[x]}

Makes settings update only when the mouse is released:

{Slider2D[Dynamic[y],ContinuousAction->False],Dynamic[y]}

OpenersExampleSubsection5(Spacer1)Enabled  (1)

By default, (RefLink[Slider2D, paclet:ref/Slider2D]) is enabled:

Slider2D[{0.5,0.5}]

Make the slider disabled but visible in its current state:

Slider2D[{0.3,0.8},Enabled->False]

OpenersExampleSubsection6(Spacer1)ImageMargins  (2)

Use symbolic values for image margins:

Table[Framed@Slider2D[ImageMargins->m],{m,{Small,Medium,Large}}]

Set the image margin in printer's points:

Table[Framed@Slider2D[ImageMargins->m],{m,{0,5,10}}]

OpenersExampleSubsection7(Spacer1)ImageSize  (2)

Use preset values:

Table[Slider2D[Dynamic[x],ImageSize->s],{s,{Tiny,Small,Medium,Large}}]

Use numerical values:

Table[Slider2D[Dynamic[x],ImageSize->{s,s}],{s,{30,50,100}}]

OpenersExampleSection3(Spacer1)Applications  (2)

A color selector:

{Slider2D[Dynamic[c]],Dynamic@Graphics[{Hue@@c,Rectangle[]},ImageSize->100]}

A simple camera controller:

DynamicModule[{p={2π,0}},
{Slider2D[Dynamic[p],{{2Pi,0},{0,Pi}}],
ParametricPlot3D[(({Cos[u] Cos[v],Sin[u] Cos[v],Sin[v]})^3), {u,0,2Pi},{v,-Pi/2,Pi/2},Mesh->None,PlotRange->All,Ticks->None,SphericalRegion->True,ViewPoint->Dynamic[4{Cos[p[[1]]]Sin[p[[2]]],Sin[p[[1]]]Sin[p[[2]]],Cos[p[[2]]]}]]}]

OpenersExampleSection4(Spacer1)Properties & Relations  (1)

A (RefLink[Locator, paclet:ref/Locator]) or (RefLink[LocatorPane, paclet:ref/LocatorPane]) can be used if the control should be contained within graphics:

{Slider2D[Dynamic[pt1]],Dynamic[pt1]}

DynamicModule[{pt2={0,0}},{Framed[Graphics[{Locator[Dynamic[pt2]]},PlotRange->1]],Dynamic[pt2]}]

{LocatorPane[Dynamic[pt3],Framed[Graphics[{},PlotRange->1]]],Dynamic[pt3]}

OpenersExampleSection5(Spacer1)Possible Issues  (1)

The limits in (RefLink[Slider2D, paclet:ref/Slider2D]) are specified by giving coordinates of corners, not x and y ranges:

Slider2D[{1/2,1/2},{{0,0},{1,1}}]

The limits are identical, so the slider cannot move:

Slider2D[{1/2,1/2},{{0,1},{0,1}}]

OpenersExampleSection6(Spacer1)Neat Examples  (1)

Coupled sliders:

{Slider2D[Dynamic[r]],Slider2D[Dynamic[1-r,(r=1-#)&]]}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[LocatorPane, paclet:ref/LocatorPane])  ▪  (RefLink[Locator, paclet:ref/Locator])  ▪  (RefLink[Manipulate, paclet:ref/Manipulate])  ▪  (RefLink[Control, paclet:ref/Control])  ▪  (RefLink[Slider, paclet:ref/Slider])  ▪  (RefLink[VerticalSlider, paclet:ref/VerticalSlider])  ▪  (RefLink[Inset, paclet:ref/Inset])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Introduction to Dynamic, paclet:tutorial/IntroductionToDynamic])}, {▪(RefLinkPlain[Introduction to Control Objects, paclet:tutorial/IntroductionToControlObjects])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Control Objects, paclet:guide/ControlObjects])}, {▪(RefLinkPlain[Dynamic Visualization, paclet:guide/DynamicVisualization])}})}})