TimeUpDown
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.1.0.0)
Represents a spinner control that displays TimeSpan values.
- C#
- VB.NET
public class TimeUpDown : UpDownBase, ISupportInitialize, INotifyPropertyChanged
Public Class TimeUpDown
Inherits UpDownBase
Implements ISupportInitialize, INotifyPropertyChanged
Constructors
TimeUpDown()
Initializes a new instance of the TimeUpDown class.
Properties
Format
TimeUpDownFormat: Returns or sets the format use to display and parse the time value. (Default: HHMM)
HidePromptOnLeave
Boolean: Returns or sets whether the prompt characters in the input mask are hidden when the control loses focus. (Default: False)
Maximum
TimeSpan: Returns or sets the maximum value for the time editor.
Minimum
TimeSpan: Returns or sets the minimum allowed value for time editor.
NullableValue
Nullable<TimeSpan>: Returns or sets the Value assigned to the spin box (also known as an up-down control) with the difference that when the text is empty it returns null.
This property should be used when the TimeUpDown may hold a null value and it's bound to a database nullable column. Throws:
- ArgumentOutOfRangeException The assigned value is less than the Minimum property value; or the assigned value is greater than the Maximum property value.
PromptChar
Char: Returns or sets the character used to represent the absence of user input in the TimeUpDown control.
Since 3.5.5 (Default: _)
Throws:
- ArgumentException The character specified when setting this property is not a valid prompt character.
Text
String: Returns or sets the text to be displayed in the TimeUpDown control. (Default: "")
Value
TimeSpan: Returns or sets the value assigned to the TimeUpDown editor.
Throws:
- ArgumentOutOfRangeException The assigned value is less than the Minimum property value; or the assigned value is greater than the Maximum property value.
Methods
OnTextChanged(e)
Fires the TextChanged event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | An EventArgs that contains the event data. |
OnValidating(e)
Fires the Validating event.
| Parameter | Type | Description |
|---|---|---|
| e | CancelEventArgs | A EventArgs that contains the event data. |
OnValueChanged(e)
Fires the ValueChanged event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | A EventArgs that contains the event data. |
OnWebEvent(e)
Processes the event from the client.
| Parameter | Type | Description |
|---|---|---|
| e | WisejEventArgs | Event arguments. |
OnWebRender(config)
Renders the client component.
| Parameter | Type | Description |
|---|---|---|
| config | Object | Dynamic configuration object. |
OnWebUpdate(state)
Updates the client component using the state information.
| Parameter | Type | Description |
|---|---|---|
| state | Object | Dynamic state object. |
UpdateEditText()
Displays the current value of the spin box (also known as an up-down control) in the appropriate format.
ValidateEditText()
Validates and updates the text displayed in the spin box (also known as an up-down control).
Returns: Boolean. True if the text represents a valid value.
Events
ValueChanged
EventHandler Fired when the Value property has been changed in some way.
Implements
| Name | Description |
|---|---|
| IUserData | Provides access to the UserData and Tag properties associated to the component implementing this interface. |
| IBindableComponent | Bindable components implement this interface. |
| IDropTarget | Controls that support drag & drop operations implement this interface. |
| ILabel | Provides access to the LabelWrapper associated with the controls that implement this interface. |
| IReadOnly | Provides access to the ReadOnly property for coontrols that support the read-only mode. |
| IValidation | Provides access to the validation events and properties property for controls that support validation. |
| IWisejComponent | All wisej components implement this interface. |
| IWisejControl | All wisej controls derived from the Control class must implement this interface. |
| IWisejSerializable | Allows an object to serialize itself. |