TrackBar
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.1.0.0)
Enables the user to choose between a range of values by sliding a small bar along another bar.
- C#
- VB.NET
public class TrackBar : Control, ISupportInitialize
Public Class TrackBar
Inherits Control
Implements ISupportInitialize
Constructors
TrackBar()
Initializes a new instance of the TrackBar class.
TrackBar(onValueChanged)
Initializes a new instance of the TrackBar class with a specified initial value and an event handler for the ValueChanged event.
| Name | Type | Description |
|---|---|---|
| onValueChanged | Action<Object, EventArgs> | An Action delegate to handle the ValueChanged event. Can be null. |
TrackBar(location, size, onValueChanged)
Initializes a new instance of the TrackBar class with a specified location and size.
| Name | Type | Description |
|---|---|---|
| location | Point | The location of the TrackBar on its parent control. |
| size | Size | The size of the TrackBar. |
| onValueChanged | Action<Object, EventArgs> | An Action delegate to handle the ValueChanged event. Can be null. |
Properties
AutoSize
Boolean: Returns or sets whether the height or width of the track bar is being automatically sized. (Default: True)
DefaultSize
Size: Returns the default size of the TrackBar.
LargeChange
Int32: Returns or sets a value to be added to or subtracted from the Value property when the scroll box is moved a large distance. (Default: 5)
Throws:
- ArgumentException The assigned value is less than 0.
Maximum
Int32: Returns or sets the upper limit of the range this TrackBar is working with. (Default: 10)
Minimum
Int32: Returns or sets the lower limit of the range this TrackBar is working with. (Default: 0)
Orientation
Orientation: Returns or sets a value indicating the horizontal or vertical orientation of the track bar. (Default: Horizontal)
ShowValue
Boolean: Returns or sets a flag indicating whether the value is displayed in a bubble control while the user is moving the knob. (Default: True)
The appearance key of the child bubble component is "bubble".
SmallChange
Int32: Returns or sets the value added to or subtracted from the Value property when the scroll box is moved a small distance. (Default: 1)
TickFrequency
Int32: Returns or sets a value that specifies the delta between ticks drawn on the control. (Default: 1)
TickStyle
TickStyle: Returns or sets a value indicating how to display the tick marks on the track bar. (Default: BottomRight)
Value
Int32: Returns or sets a numeric value that represents the current position of the scroll box on the track bar. (Default: 0)
Throws:
- ArgumentException The assigned value is less than the value of Minimum; or the assigned value is greater than the value of Maximum.
Methods
IsInputKey(keyData)
Handles special input keys, such as PAGE UP, PAGE DOWN, HOME, and END.
| Parameter | Type | Description |
|---|---|---|
| keyData | Keys | One of the Keys values. |
Returns: Boolean. true if the specified key is a regular input key; otherwise, false.
OnScroll(e)
Fires the Scroll event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | A EventArgs that contains the event data. |
OnTextChanged(e)
Fires the TextChanged event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The EventArgs that contains the event data. |
OnValueChanged(e)
Fires the ValueChanged event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The 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. |
SetBoundsCore(x, y, width, height, specified)
Sets the specified bounds of the ComboBox control.
| Parameter | Type | Description |
|---|---|---|
| x | Int32 | The new Left property value of the control. |
| y | Int32 | The new Top property value of the control. |
| width | Int32 | The new Width property value of the control. |
| height | Int32 | Not used. |
| specified | BoundsSpecified | A combination of the BoundsSpecified values. |
SetRange(minValue, maxValue)
Sets the minimum and maximum values for a TrackBar.
| Parameter | Type | Description |
|---|---|---|
| minValue | Int32 | The lower limit of the range of the track bar. |
| maxValue | Int32 | The upper limit of the range of the track bar. |
Events
AutoSizeChanged
EventHandler Fired when the value of the AutoSize property changes.
Scroll
EventHandler Fired when either a mouse or keyboard action moves the scroll box.
TextChanged
EventHandler Fired when the Text property changes.
ValueChanged
EventHandler Fired when the Value property of a track bar changes, either by movement of the scroll box or by manipulation in code.
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. |
| 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. |