ACTIVATE HSCROLLBAR
7.8.5, PLBCMP GUI Only
The ACTIVATE HSCROLLBAR statement makes a HSCROLLBAR visible and allows the user to interact with it. An optional execution label may be provided to process information if the user selects the HSCROLLBAR. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
hscrollbar
Required. The name of a previously created HSCROLLBAR object variable or a pointer to a HSCROLLBAR object.
routine
Optional. A program execution label called when a mouse click occurs within the screen boundaries of the object.
result
Optional. A previously defined Numeric Variable in which the result code as described below is placed upon object selection.
Flags Affected: NONE
Note the following:
If the {routine} and {result} operands are not provided, the runtime performs a default action of setting a HSCROLLBAR to the selected position.
If the {result} operand is specified, it is set
to a nine-digit number. The low order eight (8) digits define the current location of the slide box and
are within the range defined by {min} and {max}. The ninth digit of the result operand defines the action
performed for the scroll bar causing entry to the activation routine as follows:
|
Value |
Meaning |
|
1 |
Line down using the down arrow. |
|
2 |
Line up using the up arrow. |
|
3 |
Page down using the page down key or clicking in the scrollbar area below the slide box. |
|
4 |
Page up using the page up key or clicking in the scrollbar area above the slide box. |
|
5 |
Slide box moved to a new location. |
|
6 |
Movement ignored - already at minimum value. |
|
7 |
Movement ignored - already at maximum value. |
If the {result} operand is too small to contain the value, the OVER flag is set upon entry to the {routine}. This flag setting does not occur at the time of the ACTIVATE butat the time the {routine} is called.
The {routine} is called when a mouse click occurs within the screen boundaries of the HSCROLLBAR.
The {routine} is called as if a CALL instruction was performed. It is only called when an EVENTCHECK or EVENTWAIT is executed.
When the {routine} is complete, a RETURN instruction continues execution at the instruction following the EVENTWAIT or EVENTCHECK. Otherwise, a NORETURN instruction should be executed to clear the return address from the call stack.
All other object operations, such as scroll bar manipulation and screen updating, are automatically performed by the runtime.
If the object specified by an ACTIVATE instruction is already active, the old {routine} and {result} operands are replaced with the new {routine} and {result} operands.
An object must be CREATEd before it is activated. If this is not done, a runtime error of O105 is generated.
If insufficient memory is available to perform the operation, a runtime error O106 is generated.
If a FILEPI instruction is active, it is terminated
See Also: Example Code, ACTIVATE, DEACTIVATE, Object Output Instructions
![]() |