Click or drag to resize

GH_SliderBase Class

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

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
  NameDescription
Public methodGH_SliderBase
Initializes a new instance of the GH_SliderBase class
Top
Properties
  NameDescription
Public propertyBounds
Gets or sets the bounds of the slider.
(Overrides GH_TextBoxInputBase.Bounds.)
Public propertyControlBackColour
Gets or sets the BackColour for this slider control.
Public propertyControlEdgeColour
Gets or sets the EdgeColor for this slider control.
Public propertyControlShadowColour
Gets or sets the Shadow colour for this control.
Public propertyDecimalPlaces
Gets or sets the number of decimal places allowed for floating point type sliders. Valid values between zero and 12.
Public propertyDrawControlBackground
Gets or sets whether the background of the slider should be drawn.
Public propertyDrawControlBorder
Gets or sets whether the border of the slider should be drawn.
Public propertyDrawControlShadows
Gets or sets whether the drop shadows of the slider should be drawn.
Public propertyEpsilon
Gets the smallest value change supported by the current slider properties.
Public propertyFont
Gets or sets the font for this slider.
(Overrides GH_TextBoxInputBaseFont.)
Public propertyFormatMask
Gets or sets the string format mask to use for the display. Should contain at least one "{0}" element.
Public propertyGrip
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 propertyGripBottomColour
Gets or sets the fill colour for the bottom edge of the slider grip.
Public propertyGripDisplay
Gets or sets how the slider grip (or thumb) is drawn.
Public propertyGripEdgeColour
Gets or sets the edge colour for the slider grip.
Public propertyGripText
Gets the text that will be drawn on the slider.
Public propertyGripTopColour
Gets or sets the fill colour for the top edge of the slider grip.
Public propertyGripWidth
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 propertyIsTextInput
Gets whether the text input box is currently on screen.
(Inherited from GH_TextBoxInputBase.)
Public propertyMaximum
Gets or sets the upper limit of the slider.
Public propertyMinimum
Gets or sets the lower limit of the slider.
Public propertyNormalizedValue
Gets or sets the normalized value within the slider domain.
Public propertyPadding
Gets or sets the padding around the slider border.
Public propertyRail
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 propertyRailBrightColour
Gets or sets the bright colour used to draw rails and ticks.
Public propertyRailDarkColour
Gets or sets the dark colour used to draw rails and ticks.
Public propertyRailDisplay
Gets or sets how the slider rail (or track) is drawn.
Public propertyRailEmptyColour
Gets or sets the fill colour for the empty portion of the rail.
Public propertyRailFullColour
Gets or sets the fill colour for the full portion of the rail.
Public propertyRaiseEvents
Gets or sets a value indicating whether this slider raises the ValueChanged event.
Public propertyShadowSize
Gets or sets the size of the border shadow along all edges of the box.
Public propertySnapDistance
Gets or sets the snap distance in absolute values.
Public propertyTextColour
Gets or sets the fill colour for the slider text.
Public propertyTextInputHandlerDelegate
Gets or sets the custom handler for text input. If you do not set a custom handler the default behaviour will be used.
Public propertyTickCount
Gets or sets the number of ticks displayed.
Public propertyTickDisplay
Gets or sets how the slider ticks are drawn.
Public propertyTickFrequency
Gets or sets the frequency of large ticks vs small ticks.
Public propertyTicks
Gets a list of all the tick offset x positions.
Public propertyType
Gets or sets the accuracy type of the slider.
Public propertyValue
Gets or sets the value of the slider.
Public propertyValueF
Gets or sets the value of the slider in single precision.
Top
Methods
  NameDescription
Public methodFixDomain
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 methodFixValue
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 methodHandleTextInputAccepted (Overrides GH_TextBoxInputBaseHandleTextInputAccepted(String).)
Public methodHideTextInputBox
Hides the text-input override form (if it is displayed).
(Inherited from GH_TextBoxInputBase.)
Public methodKeyDown
Respond to a KeyDown event.
Public methodMouseDown
Respond to mouse-down events.
Public methodMouseMove
Respond to mouse-move events.
Public methodMouseUp
Respond to mouse-up events.
Public methodOnValueChanged
Raise the ValueChanged event.
Public methodStatic memberProcessNumber
Process a number using the given slider characteristics.
Public methodRender
Render this slider into a Graphics context.
Public methodRespondToEnter (Inherited from GH_TextBoxInputBase.)
Public methodRespondToEscape (Inherited from GH_TextBoxInputBase.)
Public methodSetSnapRanges
Assign a collection of snap ranges to this slider.
Public methodShowTextInputBox(Control)
Public methodShowTextInputBox(Control, Boolean)
Public methodShowTextInputBox(Control, Boolean, Matrix)
Public methodShowTextInputBox(Control, String, Boolean)
Display a floating text-box on top of the owner control.
(Inherited from GH_TextBoxInputBase.)
Public methodShowTextInputBox(Control, Boolean, Matrix, String)
Public methodShowTextInputBox(Control, String, Boolean, Boolean)
Display a floating text-box on top of the owner control.
(Inherited from GH_TextBoxInputBase.)
Public methodShowTextInputBox(Control, String, Boolean, Boolean, Matrix)
Display a floating text-box on top of the owner control.
(Inherited from GH_TextBoxInputBase.)
Top
Events
  NameDescription
Public eventValueChanged
Raised whenever the value of this slider is changed due to User-Interface methods.
Top
See Also