DecimalTextBox Class
Represents a text box to edit decimal values.
Namespace: KGySoft.WinForms.ControlsAssembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
[ToolboxBitmapAttribute(typeof(DecimalTextBox), "Resources.Toolbox.DecimalTextBox.png")]
public class DecimalTextBox : AdvancedTextBox
<ToolboxBitmapAttribute(GetType(DecimalTextBox), "Resources.Toolbox.DecimalTextBox.png")>
Public Class DecimalTextBox
Inherits AdvancedTextBox
[ToolboxBitmapAttribute(typeof(DecimalTextBox), L"Resources.Toolbox.DecimalTextBox.png")]
public ref class DecimalTextBox : public AdvancedTextBox
[<ToolboxBitmapAttribute(typeof(DecimalTextBox), "Resources.Toolbox.DecimalTextBox.png")>]
type DecimalTextBox =
class
inherit AdvancedTextBox
end
- Inheritance
- Object MarshalByRefObject Component Control TextBoxBase TextBox AdvancedTextBox DecimalTextBox
The
DecimalTextBox control offers the following features:
- Coloring in disabled mode (provided by the base AdvancedTextBox control).
- A decimal Value property for getting/setting the decimal value.
- Multiplier hotkeys: t = thousand; m = million; y = billion (yard).
- Configurable limits for Value.
- Optional blank state if BlankEnabled is .
- Formatting options (see Format).
- Configurable number of decimal digits or rounding (see DecimalDigits).
See also the
example application that contains
an example for some features of the
AdvancedButton control.
The example is located under the
Controls Tests /
AdvancedTextBox menu.
| AutoCompleteMode | Gets or sets an option that controls how automatic completion works for the TextBox. (Inherited from AdvancedTextBox) |
| AutoScaleFont |
Gets or sets whether the Font should be automatically scaled when DPI changes and the current thread has per-monitor DPI awareness.
Default value: .
(Inherited from AdvancedTextBox) |
| BackColor |
Gets or sets the background color of the control in the current Enabled and ReadOnly state.
(Inherited from AdvancedTextBox) |
| Blank |
Gets or sets whether the DecimalTextBox is in blank state.
Can be set only if BlankEnabled is .
Default value: .
|
| BlankEnabled |
Gets or sets whether Blank state can be enabled.
When , then the DecimalTextBox will be automatically blank if Value is out of range.
Default value: .
|
| BlankText |
Gets or sets the caption in Blank state.
Default value: Empty string.
|
| ChangeValueOnTextChange |
Gets or sets whether Value should be changed for every keystroke when the text is edited.
Default value: , meaning, Value changes only when the control is left.
|
| DecimalDigits |
Gets or sets the used fraction digits. When negative, Value is rounded to the number of specified digits.
Default value: 0.
|
| DisabledBackColor |
Gets or sets the background color when the control is not Enabled or is ReadOnly.
(Inherited from AdvancedTextBox) |
| DisabledForeColor |
Gets or sets the text color when the control is not Enabled.
(Inherited from AdvancedTextBox) |
| EnabledBackColor |
Gets or sets the background color when the control is Enabled and not ReadOnly.
(Inherited from AdvancedTextBox) |
| EnabledForeColor |
Gets or sets the text color when the control is Enabled.
(Inherited from AdvancedTextBox) |
| Font | Gets or sets the font of the text displayed by the control. (Inherited from AdvancedTextBox) |
| ForeColor |
Gets or sets the foreground color of the control in the current state.
(Inherited from AdvancedTextBox) |
| Format |
Gets or sets the numeric formatting of the displayed Value.
Default value: Number.
|
| Range |
Gets or sets the valid range for the Value property.
If Value violates the newly set range, then either Blank will be set, or Value will be corrected if BlankEnabled is .
|
| RangeMaxValue |
Gets or sets the accepted maximum Value.
If Value violates the newly set maximum value, then either Blank will be set, or Value will be corrected if BlankEnabled is .
|
| RangeMinValue |
Gets or sets the accepted minimum Value.
If Value violates the newly set minimum value, then either Blank will be set, or Value will be corrected if BlankEnabled is .
|
| Text |
Gets or sets the text of the DecimalTextBox. It is recommended to use the Value property instead.
(Overrides TextBoxText) |
| TextAlign |
Gets or sets the horizontal text alignment.
Default value: Right.
|
| Value |
Gets or sets the value of the DecimalTextBox.
Default value: 0.
|
| ValueOnBlank |
Gets or sets what the Value property should return in Blank state.
Default value: Zero.
|