PlusMinusEditor
Edits a bounded decimal value using increment/decrement buttons, mouse-wheel input, or direct text entry.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class PlusMinusEditor : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlContainerControlUserControlPlusMinusEditor...
Implements:
Constructors
Initializes the editor controls and connects button, keyboard, validation, and mouse-wheel input.
public PlusMinusEditor()
Properties
Gets or sets the composite format string used to display Value in the text box.
public string FormatString { get; set; }
Gets or sets whether an increment/decrement action at an exact range endpoint wraps to the opposite endpoint.
public bool Loop { get; set; }
Gets or sets the upper bound applied when Value is assigned. Changing this bound does not itself adjust the current value.
public decimal MaxValue { get; set; }
Gets or sets the lower bound applied when Value is assigned. Changing this bound does not itself adjust the current value.
public decimal MinValue { get; set; }
Gets or sets the amount added or subtracted by the increment/decrement actions.
public decimal Step { get; set; }
TextBox
RadTextBox
Gets the text box used to display and edit the formatted value.
public RadTextBox TextBox { get; }
Gets or sets a suffix removed from entered text before parsing. The suffix comparison is case-insensitive.
public string TrimString { get; set; }
Gets or sets the numeric value. Assignments are clamped to MinValue and MaxValue; a change updates the formatted text and raises ValueChanged.
public decimal Value { get; set; }
Methods
Clean up any resources being used.
protected override void Dispose(bool disposing)
true if managed resources should be disposed; otherwise, false.
Overrides:
Refreshes the displayed value and raises ValueChanged after the value has changed.
protected virtual void OnValueChanged()
Parses the text box contents, removes a matching TrimString suffix, and restores the formatted current value when the remaining text is not a valid decimal.
protected virtual void TryParseUserInput()
Events
Occurs when the accepted value changes after being clamped to the configured range.
public event EventHandler ValueChanged