Utility control that improves upon the standard windows numeric text box.

Fields

m_decimals

#
protected int m_decimals

m_lower_limit

#
protected decimal m_lower_limit

m_prefix

#
protected string m_prefix

m_scroll_damping

#
protected int m_scroll_damping

m_scroll_increment

#
protected decimal m_scroll_increment

m_scroll_method

#
protected GH_NumericTextBox.GH_Scroll_Method m_scroll_method

m_scroll_width

#
protected int m_scroll_width

m_suffix

#
protected string m_suffix

m_upper_limit

#
protected decimal m_upper_limit

m_value

#
protected decimal m_value

Properties

Decimals

#
[Category("Appearance")] public int Decimals { get; set; }
Gets or sets the number of decimals displayed in the scroller.

InScrollMode

#
public bool InScrollMode { get; }

LowerLimit

#
[Category("Numeric Properties")] public double LowerLimit { get; set; }
Gets or sets the lower limit of the scroll. Adjusting the lower limit will adjust the Value, but not the upper limit.

pnlScroll

#
protected virtual GH_DoubleBufferedPanel pnlScroll { get; set; }

Prefix

#
public string Prefix { get; set; }
Gets or sets the prefix used during formatting.

PreScrollValue

#
public double PreScrollValue { get; }

ScrollDamping

#
public int ScrollDamping { get; set; }
Gets or sets the damping factor of the scroller. By default, each vertical pixel alters the value by increment. Damping allows you to slow the effect of a single pixel.

ScrollIncrement

#
[Category("Numeric Properties")] public double ScrollIncrement { get; set; }
Gets or sets the scroll increment. The increment is used when clicking on the scroll button. Also, when the button is in scroll mode, the increment controls the change per vertical pixel.

ScrollingHasBegun

#
public bool ScrollingHasBegun { get; }

ScrollingUpwards

#
public bool ScrollingUpwards { get; }

ScrollMethod

#
[Category("Numeric Properties")] public GH_NumericTextBox.GH_Scroll_Method ScrollMethod { get; set; }

ScrollMouseRelation

#
public GH_NumericTextBox.GH_ScrollMouseRelation ScrollMouseRelation { get; set; }

ScrollWidth

#
[Category("Appearance")] public int ScrollWidth { get; set; }
Gets or sets the width of the scroller button.

Suffix

#
public string Suffix { get; set; }
Gets or sets the suffix used during formatting.

txtContent

#
protected virtual TextBox txtContent { get; set; }

UpperLimit

#
[Category("Numeric Properties")] public double UpperLimit { get; set; }
Gets or sets the upper limit of the scroll. Adjusting the upper limit will adjust the Value, but not the lower limit.

Value

#
[Category("Numeric Properties")] public double Value { get; set; }
Gets or sets the current value. The value will be limited to the domain. You should set the domain first, or use the Set() function to set all values at once.

Methods

Dispose

#
protected override void Dispose(bool disposing)
disposing (bool)

FormatNumber

#
protected string FormatNumber(double num)
num (double)

FormatTextBox

#
protected void FormatTextBox()

LayoutControl

#
protected void LayoutControl()

OnValueChanged

#
public void OnValueChanged(double newvalue, double oldvalue, bool final)
newvalue (double)
oldvalue (double)
final (bool)

ParseString

#
protected double ParseString(string s)
s (string)

ParseTextBox

#
protected void ParseTextBox()

PrepareForCancel

#
public void PrepareForCancel()
PrepareForCancel

PrepareForCommit

#
public void PrepareForCommit()
PrepareForCommit

RefreshScrollPanel

#
public void RefreshScrollPanel()

Set

#
public void Set(double l_limit, double u_limit, double v_value)
Sets limits and value.
l_limit (double)Lower limit, if l_limit is larger than u_limit, l_limit will become the upper limit.
u_limit (double)Upper limit, if u_limit is smaller than l_limit, u_limit will become the lower limit.
v_value (double)Value, the value will be limited to both limits

SetDefault

#
public void SetDefault(double num)
num (double)

TrimPrefix

#
protected string TrimPrefix(string s)
s (string)

TrimSuffix

#
protected string TrimSuffix(string s)
s (string)

Events

OnScrollEnd

#

OnScrollStart

#
public event GH_NumericTextBox.OnScrollStartEventHandler OnScrollStart

ValueChanged

#
public event GH_NumericTextBox.ValueChangedEventHandler ValueChanged