VTrackBar control
Like a scroll bar, a trackbar is used as a scrolling
control, but clicking on the trackbar slider moves it in discrete
increments instead of continuously. The VTrackBar control has a
series of tick marks to the right of the trackbar channel.
To enable this control to be used properly from the keyboard,
you must add code to the LineDown, LineUp, PageDown, and PageUp
events. The code you add should change the slider Position property
by the appropriate value and then pass the new slider position to
the object or objects you associate with the trackbar control. You
must code the Moved event if you want the trackbar control to pass
on the slider position after the slider is dragged with a mouse.
Use a trackbar when you want the user to select a discrete
value. For example, you might use a trackbar to enable a user to
select a timer interval or the size of a window.
Properties
VTrackBar property |
Datatype |
Description |
---|---|---|
String |
A description of the control and/or |
|
String |
A label that briefly describes the control, |
|
AccessibleRole (enumerated) |
Describes what kind of user interface |
|
BringToTop |
Boolean |
Specifies whether PowerBuilder moves
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
Boolean |
Specifies whether PowerBuilder puts the
|
|
String |
Specifies the name of the stock icon When the user drags the control, the icon displays when the control |
|
Integer |
Specifies the height of the control, |
|
LineSize |
Integer |
Specifies how far the slider moves in |
Integer |
Specifies the value of the Position property |
|
Integer |
Specifies the value of the Position property |
|
PageSize |
Integer |
Specifies how far the slider moves in |
String |
Specifies the name of the stock pointer |
|
Integer |
Specifies a value between MinPosition |
|
Slider |
Boolean |
Specifies whether or not the trackbar |
SliderSize |
Integer |
Specifies the size of the slider on the |
Integer |
Specifies the tab value of the control |
|
String |
Specifies the tag value assigned to the |
|
TickFrequency |
Integer |
Specifies tick mark frequency. Setting |
TickMarks |
VTickMarks (enumerated) |
Specifies where tickmarks should be displayed.
|
Boolean |
Specifies whether the control is visible.
|
|
Integer |
Specifies the width of the control, in |
|
Integer |
Specifies the X position (the distance |
|
Integer |
Specifies the Y position (the distance |
Events
VTrackBar event |
Occurs |
---|---|
Immediately before the Open event occurs |
|
Immediately after the Close event occurs |
|
When a dragged control is dropped on |
|
When a dragged control enters the control |
|
When a dragged control leaves the control |
|
When a dragged control is within the |
|
Just before the control receives focus |
|
When the user presses the F1 key or drags |
|
When the down arrow key is clicked |
|
When the up arrow key is clicked |
|
When the control loses focus (becomes |
|
When the slider is moved (use the Position |
|
When a Windows message occurs that is |
|
When the Page Down key is clicked or |
|
When the Page Up key is clicked or when |
|
When the right mouse button is pressed |
Functions
VTrackBar function |
Datatype returned |
Description |
---|---|---|
String |
Returns the name assigned to the control. |
|
Integer |
Starts or ends the dragging of the control. |
|
Integer |
Creates a reference to a context-specific |
|
PowerObject |
Returns a reference to the name of the |
|
Integer |
Makes the control invisible. |
|
Integer |
Moves the control to a specified location. |
|
Integer |
Returns the distance of the pointer from |
|
Integer |
Returns the distance of the pointer from |
|
Boolean |
Adds an event to the end of the message |
|
Integer |
Prints the control. |
|
Integer |
Changes the size of the control. |
|
Integer |
Sets a selection range for the trackbar. |
|
Integer |
Sets the focus to the control. |
|
Integer |
Specifies the position of the control |
|
Integer |
Controls automatic redrawing of the control |
|
Integer |
Makes the control visible. |
|
Integer |
Triggers a specified event in the control |
|
Object |
Returns the type of the control. |