GH_SliderBase
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
GH_SliderBase
Initializes a new instance of the GH_SliderBase class
Properties
Name
Description
Public Property
Bounds
Gets or sets the bounds of the slider.
(Overrides GH_TextBoxInputBase.Bounds.)
Public Property
ControlBackColour
Gets or sets the BackColour for this slider control.
Public Property
ControlEdgeColour
Gets or sets the EdgeColor for this slider control.
Public Property
ControlShadowColour
Gets or sets the Shadow colour for this control.
Public Property
DecimalPlaces
Gets or sets the number of decimal places allowed for floating point type sliders. Valid values between zero and 12.
Public Property
DrawControlBackground
Gets or sets whether the background of the slider should be drawn.
Public Property
DrawControlBorder
Gets or sets whether the border of the slider should be drawn.
Public Property
DrawControlShadows
Gets or sets whether the drop shadows of the slider should be drawn.
Public Property
Epsilon
Gets the smallest value change supported by the current slider properties.
Public Property
Font
Gets or sets the font for this slider.
(Overrides
GH_TextBoxInputBase.Font
.)Public Property
FormatMask
Gets or sets the string format mask to use for the display. Should contain at least one “{0}” element.
Public Property
Grip
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
GripBottomColour
Gets or sets the fill colour for the bottom edge of the slider grip.
Public Property
GripDisplay
Gets or sets how the slider grip (or thumb) is drawn.
Public Property
GripEdgeColour
Gets or sets the edge colour for the slider grip.
Public Property
GripText
Gets the text that will be drawn on the slider.
Public Property
GripTopColour
Gets or sets the fill colour for the top edge of the slider grip.
Public Property
GripWidth
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
IsTextInput
Gets whether the text input box is currently on screen.
(Inherited from GH_TextBoxInputBase.)
Public Property
Maximum
Gets or sets the upper limit of the slider.
Public Property
Minimum
Gets or sets the lower limit of the slider.
Public Property
NormalizedValue
Gets or sets the normalized value within the slider domain.
Public Property
Padding
Gets or sets the padding around the slider border.
Public Property
Rail
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
RailBrightColour
Gets or sets the bright colour used to draw rails and ticks.
Public Property
RailDarkColour
Gets or sets the dark colour used to draw rails and ticks.
Public Property
RailDisplay
Gets or sets how the slider rail (or track) is drawn.
Public Property
RailEmptyColour
Gets or sets the fill colour for the empty portion of the rail.
Public Property
RailFullColour
Gets or sets the fill colour for the full portion of the rail.
Public Property
RaiseEvents
Gets or sets a value indicating whether this slider raises the ValueChanged event.
Public Property
ShadowSize
Gets or sets the size of the border shadow along all edges of the box.
Public Property
SnapDistance
Gets or sets the snap distance in absolute values.
Public Property
TextColour
Gets or sets the fill colour for the slider text.
Public Property
TextInputHandlerDelegate
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
TickCount
Gets or sets the number of ticks displayed.
Public Property
TickDisplay
Gets or sets how the slider ticks are drawn.
Public Property
TickFrequency
Gets or sets the frequency of large ticks vs small ticks.
Public Property
Ticks
Gets a list of all the tick offset x positions.
Public Property
Type
Gets or sets the accuracy type of the slider.
Public Property
Value
Gets or sets the value of the slider.
Public Property
ValueF
Gets or sets the value of the slider in single precision.
Methods
Name
Description
Public Method
FixDomain
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
FixValue
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
HandleTextInputAccepted
(Overrides
GH_TextBoxInputBase.HandleTextInputAccepted(String)
.)Public Method
HideTextInputBox
Hides the text-input override form (if it is displayed).
(Inherited from GH_TextBoxInputBase.)
Public Method
KeyDown
Respond to a KeyDown event.
Public Method
MouseDown
Respond to mouse-down events.
Public Method
MouseMove
Respond to mouse-move events.
Public Method
MouseUp
Respond to mouse-up events.
Public Method
OnValueChanged
Raise the ValueChanged event.
Public Method
Static Member
ProcessNumber
Process a number using the given slider characteristics.
Public Method
Render
Render this slider into a Graphics context.
Public Method
RespondToEnter
(Inherited from GH_TextBoxInputBase.)
Public Method
RespondToEscape
(Inherited from GH_TextBoxInputBase.)
Public Method
SetSnapRanges
Assign a collection of snap ranges to this slider.
Public Method
ShowTextInputBox(Control)
Public Method
ShowTextInputBox(Control, Boolean)
Public Method
ShowTextInputBox(Control, Boolean, Matrix)
Public Method
ShowTextInputBox(Control, String, Boolean)
Display a floating text-box on top of the owner control.
(Inherited from GH_TextBoxInputBase.)
Public Method
ShowTextInputBox(Control, Boolean, Matrix, String)
Public Method
ShowTextInputBox(Control, String, Boolean, Boolean)
Display a floating text-box on top of the owner control.
(Inherited from GH_TextBoxInputBase.)
Public Method
ShowTextInputBox(Control, String, Boolean, Boolean, Matrix)
Display a floating text-box on top of the owner control.
(Inherited from GH_TextBoxInputBase.)
Events
Name
Description
Public Event
ValueChanged
Raised whenever the value of this slider is changed due to User-Interface methods.