Skip to content

GH_SliderBase

Public Class

Provides Numeric slider GUI not tied to a control-handle.

Inheritance Hierarchy

System.Object
Grasshopper.GUI.Base.GH_TextBoxInputBase
Grasshopper.GUI.Base.GH_SliderBase

Namespace: Grasshopper.GUI.Base

Assembly: Grasshopper (in Grasshopper.dll)

Syntax

public class GH_SliderBase : GH_TextBoxInputBase

The GH_SliderBase type exposes the following members.

Constructors

Name

Description


Public Method

Initializes a new instance of the GH_SliderBase class


Properties

Name

Description


Public Property

Gets or sets the bounds of the slider.

(Overrides GH_TextBoxInputBase.Bounds.)


Public Property

Gets or sets the BackColour for this slider control.


Public Property

Gets or sets the EdgeColor for this slider control.


Public Property

Gets or sets the Shadow colour for this control.


Public Property

Gets or sets the number of decimal places allowed for floating point type sliders. Valid values between zero and 12.


Public Property

Gets or sets whether the background of the slider should be drawn.


Public Property

Gets or sets whether the border of the slider should be drawn.


Public Property

Gets or sets whether the drop shadows of the slider should be drawn.


Public Property

Gets the smallest value change supported by the current slider properties.


Public Property

Gets or sets the font for this slider.

(Overrides

.)


Public Property

Gets or sets the string format mask to use for the display. Should contain at least one “{0}” element.


Public Property

Gets the box of the current grip. If the slider value/limits are not set up correctly then this rectangle may well be outside of the bounds. If the limits are coincident, this will fail (divide by zero).


Public Property

Gets or sets the fill colour for the bottom edge of the slider grip.


Public Property

Gets or sets how the slider grip (or thumb) is drawn.


Public Property

Gets or sets the edge colour for the slider grip.


Public Property

Gets the text that will be drawn on the slider.


Public Property

Gets or sets the fill colour for the top edge of the slider grip.


Public Property

Gets an estimate of the maximum number of pixels taken up by the grip. This property depends on many different factors, though should remain constant when other properties are not changed. If the Font hasn’t been specified, the default Windows.Forms.Control font is used.


Public Property

Gets whether the text input box is currently on screen.

(Inherited from GH_TextBoxInputBase.)


Public Property

Gets or sets the upper limit of the slider.


Public Property

Gets or sets the lower limit of the slider.


Public Property

Gets or sets the normalized value within the slider domain.


Public Property

Gets or sets the padding around the slider border.


Public Property

Gets the shape of the rail. The height of the rectangle will be zero, but the y-position will be rounded to integer precision.


Public Property

Gets or sets the bright colour used to draw rails and ticks.


Public Property

Gets or sets the dark colour used to draw rails and ticks.


Public Property

Gets or sets how the slider rail (or track) is drawn.


Public Property

Gets or sets the fill colour for the empty portion of the rail.


Public Property

Gets or sets the fill colour for the full portion of the rail.


Public Property

Gets or sets a value indicating whether this slider raises the ValueChanged event.


Public Property

Gets or sets the size of the border shadow along all edges of the box.


Public Property

Gets or sets the snap distance in absolute values.


Public Property

Gets or sets the fill colour for the slider text.


Public Property

Gets or sets the custom handler for text input. If you do not set a custom handler the default behaviour will be used.


Public Property

Gets or sets the number of ticks displayed.


Public Property

Gets or sets how the slider ticks are drawn.


Public Property

Gets or sets the frequency of large ticks vs small ticks.


Public Property

Gets a list of all the tick offset x positions.


Public Property

Gets or sets the accuracy type of the slider.


Public Property

Gets or sets the value of the slider.


Public Property

Gets or sets the value of the slider in single precision.


Methods

Name

Description


Public Method

Fix the limits of the slider. Limits will be rounded according to slider type and accuracy. Also, a minimum range for all types is ensured.


Public Method

Fix the value of the slider. The value will be rounded according to slider type and accuracy. Also, the value will be clipped to the limits. Before you call this function, ensure the limits are set up correctly.


Protected method

(Overrides

.)


Public Method

Hides the text-input override form (if it is displayed).

(Inherited from GH_TextBoxInputBase.)


Public Method

Respond to a KeyDown event.


Public Method

Respond to mouse-down events.


Public Method

Respond to mouse-move events.


Public Method

Respond to mouse-up events.


Public Method

Raise the ValueChanged event.


Public Method
Static Member

Process a number using the given slider characteristics.


Public Method

Render this slider into a Graphics context.


Public Method

(Inherited from GH_TextBoxInputBase.)


Public Method

(Inherited from GH_TextBoxInputBase.)


Public Method

Assign a collection of snap ranges to this slider.


Public Method

Public Method

Public Method

Public Method

Display a floating text-box on top of the owner control.

(Inherited from GH_TextBoxInputBase.)


Public Method

Public Method

Display a floating text-box on top of the owner control.

(Inherited from GH_TextBoxInputBase.)


Public Method

Display a floating text-box on top of the owner control.

(Inherited from GH_TextBoxInputBase.)


Events

Name

Description


Public Event

Raised whenever the value of this slider is changed due to User-Interface methods.