Provides a standard Grasshopper slider as a winforms control.

Constructors

GH_Slider

#
public GH_Slider()

Properties

ControlEdgeColour

#
[Category("Colours")] public Color ControlEdgeColour { get; set; }
Gets or sets the EdgeColor for this slider control.

ControlShadowColour

#
[Category("Colours")] public Color ControlShadowColour { get; set; }
Gets or sets the Shadow colour for this control.

DecimalPlaces

#
[Category("Slider Numerics")] public int DecimalPlaces { get; set; }
Gets or sets the number of decimal places allowed for Floating Point Sliders.

DrawControlBorder

#
[Category("Display")] public bool DrawControlBorder { get; set; }
Gets or sets whether the border of the slider should be drawn.

DrawControlShadows

#
[Category("Display")] public bool DrawControlShadows { get; set; }
Gets or sets whether the drop shadows of the slider should be drawn.

FormatMask

#
[Category("Display")] public string FormatMask { get; set; }
Gets or sets the string format mask to use for the display. Should contain at least one "{0}" element.

GripBottomColour

#
[Category("Colours")] public Color GripBottomColour { get; set; }
Gets or sets the fill colour for the bottom edge of the slider grip.

GripDisplay

#
[Category("Display")] public GH_SliderGripDisplay GripDisplay { get; set; }
Gets or sets how the slider grip (or thumb) is drawn.

GripEdgeColour

#
[Category("Colours")] public Color GripEdgeColour { get; set; }
Gets or sets the edge colour for the slider grip.

GripTopColour

#
[Category("Colours")] public Color GripTopColour { get; set; }
Gets or sets the fill colour for the top edge of the slider grip.

InternalSlider

#
[Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] public GH_SliderBase InternalSlider { get; }
Gets the internal slider.

IsTextInputActive

[Browsable(false)] public bool IsTextInputActive { get; }
Gets whether the text input override is currently displayed.
inherited fromGH_TextInputBaseControl

Maximum

#
[Category("Slider Numerics")] public decimal Maximum { get; set; }
Gets or sets the upper numeric limit for the slider range.

Minimum

#
[Category("Slider Numerics")] public decimal Minimum { get; set; }
Gets or sets the lower numeric limit for the slider range.

RailBrightColour

#
[Category("Colours")] public Color RailBrightColour { get; set; }
Gets or sets the edge colour for the bright parts of the rail.

RailDarkColour

#
[Category("Colours")] public Color RailDarkColour { get; set; }
Gets or sets the edge colour for the dark parts of the rail.

RailDisplay

#
[Category("Display")] public GH_SliderRailDisplay RailDisplay { get; set; }
Gets or sets how the slider rail (or track) is drawn.

RailEmptyColour

#
[Category("Colours")] public Color RailEmptyColour { get; set; }
Gets or sets the fill colour for the empty portion of the rail.

RailFullColour

#
[Category("Colours")] public Color RailFullColour { get; set; }
Gets or sets the fill colour for the full portion of the rail.

ShadowSize

#
[Category("Display")] public Padding ShadowSize { get; set; }
Gets or sets the size of the border shadow along all edges of the box.

ShowTextInputOnDoubleClick

[Category("Text Input")] [DisplayName("Show on DoubleClick")] [Description("Show the text input override on double click events")] public bool ShowTextInputOnDoubleClick { get; set; }
Gets or sets whether this control displays the text input override on a double mouse click.
inherited fromGH_TextInputBaseControl

ShowTextInputOnKeyDown

[Category("Text Input")] [DisplayName("Show on KeyDown")] [Description("Show the text input override on keydown events")] public bool ShowTextInputOnKeyDown { get; set; }
Gets or sets whether this control displays the text input override on a key down event.
inherited fromGH_TextInputBaseControl

TextColour

#
[Category("Colours")] public Color TextColour { get; set; }
Gets or sets the fill colour for the slider text.

TickCount

#
[Category("Display")] public int TickCount { get; set; }
Gets or sets the number of ticks.

TickDisplay

#
[Category("Display")] public GH_SliderTickDisplay TickDisplay { get; set; }
Gets or sets how the slider ticks are drawn.

TickFrequency

#
[Category("Display")] public int TickFrequency { get; set; }
Gets or sets the frequency of large ticks vs small ticks.

Type

#
[Category("Slider Numerics")] public GH_SliderAccuracy Type { get; set; }
Gets or sets the numeric type of this slider.

Value

#
[Category("Slider Numerics")] public decimal Value { get; set; }
Gets or sets the numeric value for the slider range.

Methods

Dispose

protected override void Dispose(bool disposing)
inherited fromGH_TextInputBaseControl
disposing (bool)

HideTextInput

protected void HideTextInput()
inherited fromGH_TextInputBaseControl

Input_Assign

#
protected override void Input_Assign(string text)
text (string)

Input_Parse

#
protected override bool Input_Parse(string text)
text (string)

Input_Supply

#
protected override string Input_Supply()

OnPaint

#
protected override void OnPaint(PaintEventArgs e)
e (PaintEventArgs)
Control.OnPaint

OnPaintBackground

#
protected override void OnPaintBackground(PaintEventArgs e)

ShowTextInput

protected void ShowTextInput()
inherited fromGH_TextInputBaseControl

Events

ValueChanged

#
public event GH_Slider.ValueChangedEventHandler ValueChanged
Raised whenever the value of the slider is changed via GUI interaction.