# NumberPicker class

Namespace: [Grasshopper2.UI.Numberline](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.numberline.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class NumberPicker : IResponsive
```

Standard numberline picker UX object. The picked value is always the number underneath a fixed marker line in the horizontal centre of the control. The numberline itself is dragged and zoomed underneath that marker.

## Constructors

- [NumberPicker](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/ctor.md): (4 overloads) Create a default number picker.

## Properties

- [BackColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/backcolour.md): Gets or sets the colour of the picker background.
- [Bounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/bounds.md): Gets or sets the layout bounds for this picker. Resizing retains the zoom, not the visible limits.
- [Centre](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/centre.md): Gets or sets the exact number underneath the marker line. Unlike [NumberPicker.Value](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/value.md) this number is never rounded.
- [Limits](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/limits.md): Gets the limits for this picker. The limits define the lowest and highest allowed values. The value of the UiNumber represents the original value.
- [LineColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/linecolour.md): Gets or sets the colour of the marker line.
- [Quantum](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/quantum.md): Gets the distance between the smallest visible ticks. This is the quantum the value is rounded to when snapping.
- [Responder](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/responder.md)
- [Scale](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/scale.md): Gets or sets the zoom of the numberline, expressed as numberline units per pixel.
- [ShowBalloon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/showballoon.md): Gets or sets whether a value balloon is drawn above the marker line while the cursor hovers over the picker or the numberline is navigated.
- [SnapToTicks](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/snaptoticks.md): Gets or sets whether the value is rounded to the visible tick density.
- [TickExponent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/tickexponent.md): Gets the power-of-ten exponent of the smallest visible tick class.
- [Value](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/value.md): Gets the picked value. This is the number underneath the marker line, rounded to the visible tick density when [NumberPicker.SnapToTicks](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/snaptoticks.md) is on.

## Methods

- [Draw](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/draw.md): Render this picker into a context.
- [DrawBalloon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/drawballoon.md): Render the value balloon above the marker line. The balloon sticks out above the bounds, so this must be called without a clipping region in place.
- [FormatValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/formatvalue.md): (2 overloads) Write a number to the decimals of a tick class.
- [QuantumFor](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/quantumfor.md): (static) Compute the distance between the smallest ticks visible at a zoom.
- [SetValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/setvalue.md): Assign a value. The numberline is recentred exactly on the new value, the zoom is retained.
- [SnapBack](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/snapback.md): Recentre the numberline exactly on the current value. The motion is animated, the value itself does not change.
- [SnapBackWhenIdle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/snapbackwhenidle.md): Snap back once navigation has been quiet for a moment. Used by navigation paths which have no explicit end signal.
- [TickExponentFor](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/tickexponentfor.md): (static) Compute the power-of-ten exponent of the smallest tick class visible at a zoom.
- [Zoom](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/zoom.md): (static) Compute a zoomed scale from a base scale and a vertical mouse motion. Uses the same convention as [Movement](https://developer.rhino3d.com/api/gh2/type/grasshopper2.eto.forms.movement.md) zooming, a downward motion of fifty pixels doubles the scale.

## Events

- [PickerDisplayChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/pickerdisplaychanged.md): This event is raised whenever the picker state, but not the value changes.
- [PickerValueChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.numberline.numberpicker/pickervaluechanged.md): This event is raised whenever the picker value changes.
