GH_DigitScrollerBase

GH_TextBoxInputBaseReferences
Provides Numeric digit scrolling GUI not tied to a control-handle.

Constructors

GH_DigitScrollerBase

#
public GH_DigitScrollerBase()

Properties

AllowRadixDrag

#
public bool AllowRadixDrag { get; set; }
Gets or sets a value indicating whether the radix is allowed to be dragged around.

AllowTextInput

#
public bool AllowTextInput { get; set; }
Gets or sets whether text input is allowed by double click.

AmplifyMotion

#
public bool AmplifyMotion { get; set; }
Gets or sets a value indicating whether vertical mouse drags should be amplified as the mouse moves further and further.

BackgroundGradient

#
public GH_Gradient BackgroundGradient { get; set; }
Gets or sets the background Gradient. If the gradient is not null, it overrides the background colours.

BottomColour

#
public Color BottomColour { get; set; }
Gets or sets the colour used along the bottom edge of the control.

Bounds

#
public override Rectangle Bounds { get; set; }
Gets or sets the Bounds for this scroller.

DecimalPlaces

#
public int DecimalPlaces { get; set; }
Gets or sets the number of decimal places available in this scroller. Unlike Radix, this property maintains the decimal position of the value represented by this scroller.

DigitAlign

#
public GH_DigitAlign DigitAlign { get; set; }
Gets or sets the digit align mode.

Digits

#
public int Digits { get; set; }
Gets or sets the number of digits available in this scroller.

DrawBackground

#
public bool DrawBackground { get; set; }
Gets or sets whether the background is drawn in this control.

DrawBorder

#
public bool DrawBorder { get; set; }
Gets or sets whether the border is drawn in this control.

DrawShadows

#
public bool DrawShadows { get; set; }
Gets or sets whether shadows are drawn in this control.

EdgeColour

#
public Color EdgeColour { get; set; }
Gets or sets the edge colour of the control.

Epsilon

#
public decimal Epsilon { get; }
Gets the smallest possible change in the value.

Font

public virtual Font Font { get; set; }
Gets or sets the Font to use in this control.
inherited fromGH_TextBoxInputBase

IsTextInput

public bool IsTextInput { get; }
Gets whether the text input box is currently on screen.
inherited fromGH_TextBoxInputBase

MaximumValue

#
public decimal MaximumValue { get; set; }
Gets or sets the upper bound of the scroll value.

MinimumValue

#
public decimal MinimumValue { get; set; }
Gets or sets the lower bound of the scroll value.

Prefix

#
public string Prefix { get; set; }
Gets or sets the prefix text to be displayed on the scroller.

PrefixBox

#
public Rectangle PrefixBox { get; }
Gets the box containing the prefix string. If there is no prefix the PrefixBox will be Rectangle.Empty

Radix

#
public int Radix { get; set; }
Gets or sets the radix index of this scroller.

RadixBox

#
public Rectangle RadixBox { get; }
Gets the Radix box for this control, if there is no radix box, Rectangle.Empty will be returned.

RailColour

#
public Color RailColour { get; set; }
Gets or sets the colour used for the rail line.

RaiseEvents

#
public bool RaiseEvents { get; set; }
Gets or sets whether this scroller raises the ValueChanged event.

ScrollBoxes

#
public List<Rectangle> ScrollBoxes { get; }
Gets all scroll boxes (from left to right) for this control, not including the radix box.

ShadowColour

#
public Color ShadowColour { get; set; }
Gets or sets the colour used for the shadows.

ShadowSize

#
public Padding ShadowSize { get; set; }
Gets or sets the size of the drop shadow along all four edges.

SignBox

#
public Rectangle SignBox { get; }
Gets the Sign box for this control.

Suffix

#
public string Suffix { get; set; }
Gets or sets the suffix text to be displayed on the scroller.

SuffixBox

#
public Rectangle SuffixBox { get; }
Gets the box containing the suffix string. If there is no suffix the PrefixBox will have zero width

TextColour

#
public Color TextColour { get; set; }
Gets or sets the colour used for the text inside the scrolls.

TopColour

#
public Color TopColour { get; set; }
Gets or sets the colour used along the top edge of the control.

Value

#
public decimal Value { get; set; }
Gets or sets the value displayed in this scroller.

Methods

HandleTextInputAccepted

#
protected override void HandleTextInputAccepted(string text)

HideTextInputBox

public void HideTextInputBox()
Hides the text-input override form (if it is displayed).
inherited fromGH_TextBoxInputBase

MouseDown

#
public GH_DigitScrollerBase.GH_MouseAction MouseDown(MouseEventArgs args, PointF pt)
Respond to mouse-down events.
args (MouseEventArgs)Mouse Event arguments.
pt (PointF)Mouse cursor position in floating point accuracy.
True if a Drag operation was started, false if the event went unnoticed.

MouseMove

#
public bool MouseMove(MouseEventArgs args, PointF pt)
Respond to mouse-move events.
args (MouseEventArgs)Mouse Event arguments.
pt (PointF)Mouse cursor position in floating point accuracy.
True if a Drag operation was performed, false if the event went unnoticed.

MouseUp

#
public bool MouseUp(MouseEventArgs args, PointF pt)
Respond to mouse-up events.
args (MouseEventArgs)Mouse Event arguments.
pt (PointF)Mouse cursor position in floating point accuracy.
True if a Drag operation was terminated, false if the event went unnoticed.

OnInvalidated

#
public void OnInvalidated()
Raise the Invalidated event.

OnValueChanged

#
public void OnValueChanged(bool intermediate)
Raise the ValueChanged event.
intermediate (bool)Set the intermediate state of the event arguments.

Render

#
public void Render(Graphics G)
Render all UI elements.
G (Graphics)Graphics object to draw with.

SetupScroller

#
public void SetupScroller(decimal minimum, decimal maximum, decimal value)
Set the minimum, maximum and value fields simultaneously.
minimum (decimal)
maximum (decimal)
value (decimal)

ShowTextInputBox

#
public void ShowTextInputBox(Control owner, bool limitToBoundary, Matrix transform)
owner (Control)
limitToBoundary (bool)
transform (Matrix)

ShowTextInputBox

#
public void ShowTextInputBox(Control owner, bool limitToBoundary)
owner (Control)
limitToBoundary (bool)

ShowTextInputBox

public void ShowTextInputBox(Control owner, string content, bool selectContent, bool limitToBoundary, Matrix transform)
Display a floating text-box on top of the owner control.
inherited fromGH_TextBoxInputBase
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

public void ShowTextInputBox(Control owner, string content, bool selectContent, bool limitToBoundary)
Display a floating text-box on top of the owner control.
inherited fromGH_TextBoxInputBase
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

public void ShowTextInputBox(Control owner, string content, bool selectContent)
Display a floating text-box on top of the owner control.
inherited fromGH_TextBoxInputBase
owner (Control)Control that owns this slider. The coordinates of the Bounds rectangle must be specified in owner coordinates.
content (string)
selectContent (bool)

ShowTextInputBox

#
public void ShowTextInputBox(Control owner)
owner (Control)

Events

Invalidated

#
public event GH_DigitScrollerBase.InvalidatedEventHandler Invalidated
Raised whenever the display of this scroller is changed, but not the value.

ValueChanged

#
public event GH_DigitScrollerBase.ValueChangedEventHandler ValueChanged
Raised whenever the value of this scroller is changed due to User-Interface methods.