Provides Numeric slider GUI not tied to a control-handle.
Properties
DecimalPlaces
#Gets or sets the number of decimal places allowed for floating point type sliders. Valid values between zero and 12.
Epsilon
#Gets the smallest value change supported by the current slider properties.
FormatMask
#Gets or sets the string format mask to use for the display. Should contain at least one "{0}" element.
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).
GripText
#Gets the text that will be drawn on the slider.
GripTextPure
#Gets the text format of the number of this slider value.
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.
Maximum
#Gets or sets the upper limit of the slider.
Minimum
#Gets or sets the lower limit of the slider.
Padding
#Gets or sets the padding around the slider border.
Rail
#public Rectangle Rail { get; }
Gets the shape of the rail. The height of the rectangle will be zero, but the y-position will be rounded to integer precision.
RailBrightColour
#public Color RailBrightColour { get; set; }
Gets or sets the bright colour used to draw rails and ticks.
RailDarkColour
#public Color RailDarkColour { get; set; }
Gets or sets the dark colour used to draw rails and ticks.
RenderDelegate_Background
#Gets or sets the delegate called after the background of the slider has been drawn.
RenderDelegate_Border
#Gets or sets the delegate called after the border of the slider has been drawn.
RenderDelegate_Ticks
#Gets or sets the delegate called after the ticks of the slider have been drawn.
ShadowSize
#Gets or sets the size of the border shadow along all edges of the box.
TextInputHandlerDelegate
#Gets or sets the custom handler for text input. If you do not set a custom handler the default behaviour will be used.
TickCount
#Gets or sets the number of ticks displayed.
TickFrequency
#Gets or sets the frequency of large ticks vs small ticks.
Methods
FixDomain
#public void 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.
FixValue
#public void 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.
HandleTextInputAccepted
#Parameters:
| text (string) |
Overrides: GH_TextBoxInputBase.HandleTextInputAccepted
HideTextInputBox
public void HideTextInputBox()
Hides the text-input override form (if it is displayed).
KeyDown
#Respond to a KeyDown event.
Parameters:
| args (KeyEventArgs) | KeyDown event arguments. |
Returns: True if something changed, false if not.
MouseDown
#Respond to mouse-down events.
Parameters:
| args (MouseEventArgs) | Mouse Event arguments. |
| pt (PointF) | Mouse cursor position in floating point accuracy. |
Returns: True if a Drag operation was started, false if the event went unnoticed.
MouseMove
#Respond to mouse-move events.
Parameters:
| args (MouseEventArgs) | Mouse Event arguments. |
| pt (PointF) | Mouse cursor position in floating point accuracy. |
Returns: True if a Drag operation was performed, false if the event went unnoticed.
MouseUp
#Respond to mouse-up events.
Parameters:
| args (MouseEventArgs) | Mouse Event arguments. |
| pt (PointF) | Mouse cursor position in floating point accuracy. |
Returns: True if a Drag operation was terminated, false if the event went unnoticed.
OnValueChanged
#Raise the ValueChanged event.
Parameters:
| intermediate (bool) | Set the intermediate state of the event arguments. |
ProcessNumber
#Process a number using the given slider characteristics.
Parameters:
| val (decimal) | Number to process. |
| accuracy (GH_SliderAccuracy) | Slider rounding accuracy. |
| digits (int) | Number of digits to use for floating point rounding. |
Returns: Processed number.
RespondToEnter
Implements: RespondToEnter
RespondToEscape
Implements: RespondToEscape
SetSnapRanges
#Assign a collection of snap ranges to this slider.
Parameters:
| ranges (IEnumerable<SliderSnapRange>) | Ranges to snap to. Will override whatever snap ranges were defined before. |
ShowTextInputBox
#ShowTextInputBox
#ShowTextInputBox
#ShowTextInputBox
Display a floating text-box on top of the owner control.
Parameters:
| owner (Control) | Control that owns this slider. The coordinates of the Bounds rectangle must be specified in owner coordinates. |
| content (string) | |
| selectContent (bool) | |
| limitToBoundary (bool) | If True, the pop up input box will be 'clipped' to the owner boundary. At least some part of the slider must be visible for this to work. |
| transform (Matrix) | Transformation matrix to apply to pop up UI. |
ShowTextInputBox
Display a floating text-box on top of the owner control.
Parameters:
| owner (Control) | Control that owns this slider. The coordinates of the Bounds rectangle must be specified in owner coordinates. |
| content (string) | |
| selectContent (bool) | |
| limitToBoundary (bool) | If True, the pop up input box will be 'clipped' to the owner boundary. At least some part of the slider must be visible for this to work. |
ShowTextInputBox
Display a floating text-box on top of the owner control.