Class RadSpinElement
Represents a numeric up/down element. The RadCheckBox class is a simple wrapper for the numeric up/down element class. The RadCheckBox acts to transfer events to and from its corresponding numeric up/down element instance. The numeric up/down element which is essentially the RadCheckBox control may be nested in other telerik controls.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadSpinElement : RadEditorElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode
Constructors
RadSpinElement()
Declaration
public RadSpinElement()
Fields
internalValue
Declaration
protected decimal internalValue
Field Value
System.Decimal
|
NullableValueChanged
Declaration
public EventHandler NullableValueChanged
Field Value
System.EventHandler
|
Properties
ButtonDown
Gets reference to the SpinControl's Down Button
Declaration
public RadRepeatArrowElement ButtonDown { get; }
Property Value
RadRepeatArrowElement
|
ButtonsLayout
ButtonUp
Gets reference to the SpinControl's Up Button
Declaration
public RadRepeatArrowElement ButtonUp { get; }
Property Value
RadRepeatArrowElement
|
DecimalPlaces
Gets or sets the number of decimal places to display in the RadSpinEdit
Declaration
public int DecimalPlaces { get; set; }
Property Value
System.Int32
|
DefaultValue
represent the default value in the numeric up/down
Declaration
protected decimal DefaultValue { get; set; }
Property Value
System.Decimal
|
EnableMouseWheel
Gets or sets a value indicating whether the user can change the value with mouse wheel.
Declaration
public bool EnableMouseWheel { get; set; }
Property Value
System.Boolean
|
EnableNullValueInput
Gets or set how to interpret the empty text in the editor portion of the control if true the empty value will set NULL in NullableValue property
Declaration
public virtual bool EnableNullValueInput { get; set; }
Property Value
System.Boolean
|
Hexadecimal
Gets or sets a value indicating whether the RadSpinEdit should display the value it contains in hexadecimal format.
Declaration
public bool Hexadecimal { get; set; }
Property Value
System.Boolean
|
InterceptArrowKeys
Gets or sets a value indicating whether the user can use the UP ARROW and DOWN ARROW keys to select values.
Declaration
public bool InterceptArrowKeys { get; set; }
Property Value
System.Boolean
|
Layout
MaxValue
set or get the Max numeric value in the numeric up/down
Declaration
public decimal MaxValue { get; set; }
Property Value
System.Decimal
|
MinValue
Gets or sets the minimum value that could be set in the spin editor
Declaration
public decimal MinValue { get; set; }
Property Value
System.Decimal
|
NullableValue
Gets or Sets represent the Value in the numeric up/down - this value can be NULL
Declaration
public virtual decimal? NullableValue { get; set; }
Property Value
System.Nullable<System.Decimal>
|
ReadOnly
Gets or sets a value indicating whether the text can be changed by the use of the up or down buttons only.
Declaration
public bool ReadOnly { get; set; }
Property Value
System.Boolean
|
RightMouseButtonReset
Gets or sets whether by right-mouse clicking the up/down button you set the max/min value respectively.
Declaration
public bool RightMouseButtonReset { get; set; }
Property Value
System.Boolean
|
ShowBorder
Gets or sets a value indicating whether the border is shown.
Declaration
public bool ShowBorder { get; set; }
Property Value
System.Boolean
|
ShowUpDownButtons
Gets or sets whether RadSpinEditor will be used as a numeric textbox.
Declaration
public bool ShowUpDownButtons { get; set; }
Property Value
System.Boolean
|
Step
Gets or sets the value which is added to/subtracted from the current value of the spin editor.
Declaration
public decimal Step { get; set; }
Property Value
System.Decimal
|
StretchVertically
allow element to be stretched vertically
Declaration
public override bool StretchVertically { get; set; }
Property Value
System.Boolean
|
Overrides
Text
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
TextAlignment
Gets or sets the minimum value that could be set in the spin editor
Declaration
public virtual HorizontalAlignment TextAlignment { get; set; }
Property Value
System.Windows.Forms.HorizontalAlignment
|
TextBoxControl
Declaration
public TextBox TextBoxControl { get; }
Property Value
System.Windows.Forms.TextBox
|
TextBoxItem
Gets RadTextBoxItem contained in the spin editor.
Declaration
public virtual RadTextBoxItem TextBoxItem { get; }
Property Value
RadTextBoxItem
|
ThousandsSeparator
Gets or sets a value indicating whether a thousands separator is displayed in the RadSpinEdit
Declaration
public bool ThousandsSeparator { get; set; }
Property Value
System.Boolean
|
Value
represent the decimal in the numeric up/down
Declaration
public decimal Value { get; set; }
Property Value
System.Decimal
|
Wrap
Gets or sets a value indicating that value will revert to minimum value after reaching maximum and to maximum after reaching minimum.
Declaration
public bool Wrap { get; set; }
Property Value
System.Boolean
|
Methods
Constrain(Decimal)
Declaration
protected virtual decimal Constrain(decimal value)
Parameters
System.Decimal
value
|
Returns
System.Decimal
|
CreateChildElements()
create child elements
Declaration
protected override void CreateChildElements()
Overrides
CreateDownButton()
Creates the button element for the decrement button.
Declaration
protected virtual RadRepeatArrowElement CreateDownButton()
Returns
RadRepeatArrowElement
A RadRepeatArrowElement to be placed in the RadSpinElement. |
CreateUpButton()
Creates the button element for the increment button.
Declaration
protected virtual RadRepeatArrowElement CreateUpButton()
Returns
RadRepeatArrowElement
A RadRepeatArrowElement to be placed in the RadSpinElement. |
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
EndTextEdit()
Declaration
protected virtual void EndTextEdit()
GetNumberText(Decimal)
Declaration
protected virtual string GetNumberText(decimal num)
Parameters
System.Decimal
num
|
Returns
System.String
|
GetValueFromText()
Declaration
protected virtual decimal GetValueFromText()
Returns
System.Decimal
|
InitializeButtons()
Declaration
protected virtual void InitializeButtons()
InitializeFields()
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
OnBitStateChanged(Int64, Boolean, Boolean)
Declaration
protected override void OnBitStateChanged(long key, bool oldValue, bool newValue)
Parameters
System.Int64
key
|
System.Boolean
oldValue
|
System.Boolean
newValue
|
Overrides
OnKeyDown(KeyEventArgs)
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
|
Overrides
OnKeyPress(KeyPressEventArgs)
Declaration
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs
e
|
Overrides
OnNullableValueChanged()
Declaration
protected virtual void OnNullableValueChanged()
OnPropertyChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
|
Overrides
OnTextBoxKeyPress(KeyPressEventArgs)
Declaration
protected void OnTextBoxKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs
e
|
OnTextChanged(EventArgs)
Declaration
protected override void OnTextChanged(EventArgs e)
Parameters
System.EventArgs
e
|
Overrides
OnValueChanged(EventArgs)
Declaration
protected virtual void OnValueChanged(EventArgs e)
Parameters
System.EventArgs
e
|
OnValueChanging(ValueChangingEventArgs)
Declaration
protected virtual void OnValueChanging(ValueChangingEventArgs e)
Parameters
ValueChangingEventArgs
e
|
PerformStep(Decimal)
increase or decrease value in the numeric up/down with step value
Declaration
public virtual void PerformStep(decimal step)
Parameters
System.Decimal
step
|
ProcessMouseWheel(MouseEventArgs)
Declaration
protected virtual void ProcessMouseWheel(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
SetSpinValue(Decimal, Boolean)
Declaration
protected virtual void SetSpinValue(decimal value, bool fromValue)
Parameters
System.Decimal
value
|
System.Boolean
fromValue
|
SetSuppresEditorState(Boolean)
This method is used internally!
Declaration
public void SetSuppresEditorState(bool newState)
Parameters
System.Boolean
newState
the new flag state. |
SetTextValueChanged(Boolean)
This method is used internally!
Declaration
public void SetTextValueChanged(bool newState)
Parameters
System.Boolean
newState
the new flag state. |
textItem_GotFocus(Object, EventArgs)
Declaration
protected virtual void textItem_GotFocus(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
textItem_LostFocus(Object, EventArgs)
Declaration
protected virtual void textItem_LostFocus(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
UnwireButtonEvents()
Declaration
protected void UnwireButtonEvents()
UnwireEvents()
Declaration
protected virtual void UnwireEvents()
Validate()
Declaration
public virtual bool Validate()
Returns
System.Boolean
|
ValidateCore()
Declaration
protected virtual void ValidateCore()
ValidateOnKeyPress(KeyPressEventArgs)
Declaration
protected virtual void ValidateOnKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs
e
|
WireButtonEvents()
Declaration
protected void WireButtonEvents()
WireEvents()
Declaration
protected virtual void WireEvents()
Events
KeyDown
Occurs when the user presses a key.
Declaration
public event KeyEventHandler KeyDown
Event Type
System.Windows.Forms.KeyEventHandler
|
ValueChanged
Occurs before the value of the SpinEdit is changed.
Declaration
public event EventHandler ValueChanged
Event Type
System.EventHandler
|
ValueChanging
Occurs when the value is being changed. Cancelable event.
Declaration
public event ValueChangingEventHandler ValueChanging
Event Type
ValueChangingEventHandler
|