HTrackBar 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 HTrackBar control has a series of tick marks along the
bottom of the trackbar channel.
To enable this control to be used properly from the keyboard, you
must add code to the LineLeft, LineRight, PageLeft, and PageRight 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.
Usage note
Use a trackbar when you want the user to select a discrete value.
For example, you can use a trackbar to enable a user to select a timer
interval or the size of a window.
Properties
|
HTrackBar property |
Datatype |
Description |
|---|---|---|
|
String |
A description of the control and/or its purpose for |
|
|
String |
A label that briefly describes the control, such as |
|
|
AccessibleRole (enumerated) |
Describes what kind of user interface element the |
|
|
Boolean |
Specifies whether PowerBuilder moves the control to TRUE FALSE — Control not moved |
|
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
|
Boolean |
Specifies whether PowerBuilder puts the control TRUE — FALSE — When the control is clicked, the |
|
|
String |
Specifies the name of the stock icon or the file When the user drags the control, the |
|
|
Integer |
Specifies the height of the control, in |
|
|
LineSize |
Integer |
Specifies how far the slider moves in response to |
|
Integer |
Specifies the value of the Position property when |
|
|
Integer |
Specifies the value of the Position property when |
|
|
PageSize |
Integer |
Specifies how far the slider moves in response to |
|
String |
Specifies the name of the stock pointer or file |
|
|
Integer |
Specifies a value between MinPosition and |
|
|
Slider |
Boolean |
Specifies whether or not the trackbar contains a |
|
SliderSize |
Integer |
Specifies the size of the slider on the trackbar. A |
|
Integer |
Specifies the tab value of the control within the |
|
|
String |
Specifies the tag value assigned to the |
|
|
TickFrequency |
Integer |
Specifies tick mark frequency. Setting |
|
TickMarks |
HTickMarks (enumerated) |
Specifies where tickmarks should be displayed. HTicksOnBottom! HTicksOnTop! HTicksOnBoth! HTicksOnNeither! |
|
Boolean |
Specifies whether the control is visible. Values TRUE — Control is visible. FALSE |
|
|
Integer |
Specifies the width of the control, in PowerBuilder |
|
|
Integer |
Specifies the X position (the distance from the |
|
|
Integer |
Specifies the Y position (the distance from the top |
Events
|
HTrackBar event |
Occurs |
|---|---|
|
Immediately before the Open event occurs in the |
|
|
Immediately after the Close event occurs in the |
|
|
When a dragged control is dropped on the |
|
|
When a dragged control enters the |
|
|
When a dragged control leaves the |
|
|
When a dragged control is within the |
|
|
Just before the control receives focus (before it |
|
|
When the user presses the F1 key or drags the |
|
|
When the left arrow key is clicked |
|
|
When the right arrow key is clicked |
|
|
When the control loses focus (becomes |
|
|
When the slider is moved (use the Position property |
|
|
When a Windows message occurs that is not a |
|
|
When the Page Up key is clicked or when mouse |
|
|
When the Page Down key is clicked or when mouse |
|
|
When the right mouse button is pressed on the |
Functions
|
HTrackBar function |
Datatype returned |
Description |
|---|---|---|
|
String |
Returns the name assigned to the |
|
|
Integer |
Starts or ends the dragging of the |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Integer |
Makes the control invisible. |
|
|
Integer |
Moves the control to a specified |
|
|
Integer |
Returns the distance of the pointer from the left |
|
|
Integer |
Returns the distance of the pointer from the top of |
|
|
Boolean |
Adds an event to the end of the message queue for |
|
|
Integer |
Prints the control. |
|
|
Integer |
Changes the size of the control. |
|
|
Integer |
Sets a selection range for the trackbar. When you |
|
|
Integer |
Sets the focus to the control. |
|
|
Integer |
Specifies the position of the control in the |
|
|
Integer |
Controls automatic redrawing of the control after |
|
|
Integer |
Makes the control visible. |
|
|
Integer |
Triggers a specified event in the control and |
|
|
Object |
Returns the type of the control. |