ACTIVATE SLIDER


PLBCMP GUI Only

 

The ACTIVATE SLIDER statement makes a SLIDER visible and allows the user to interact with it. An optional execution label may be provided to process information if the user selects the SLIDER. The instruction uses the following format:

 

 

[label]

ACTIVATE

{slider}[,{routine},{result}]

 

Where:

label

Optional. A Program Execution Label.

slider

Required. The name of a previously created SLIDER object variable or a pointer to a SLIDER 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:

  1. If the {routine} and {result} operands are not provided, the runtime performs a default action of setting the SLIDER to the selected position.

  2. If the {result} operand is specified, it should be a nine-digit number. The number indicates the current slide position in the bottom eight digits. The ninth digit is an indication of the user action as follows:
     

  3. Value

    Meaning

    1

    Down or right arrow key pressed.

    2

    Up or Left arrow key pressed.

    3

    The user clicked on the rule to the right or below the current position or pressed the Page Down key.

    4

    The user clicked on the rule to the left or above the current position or pressed the Page Up key.

    5

    The slide position has changed (mouse only).

    6

    Home key pressed.

    7

    End key pressed.

 

  1. It is the user's responsibility to adjust the SLIDER position by using the SETITEM instruction.

  2. 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.

  3. The {routine} is called when a mouse click occurs along the rule of the SLIDER.

  4. The {routine} is called as if a CALL instruction was performed. It is only called when an EVENTCHECK or EVENTWAIT is executed.

  5. All other object operations, such as slider manipulation and screen updating, are automatically performed by the runtime.

  6. 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.

  7. 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.

  8. An object must be CREATEd before it is activated. If this is not done, a runtime error of O105 is generated.

  9. If insufficient memory is available to perform the operation, a runtime error O106 is generated.

  10. If a FILEPI instruction is active, it is terminated.

 

 

See Also: Example Code, ACTIVATE, DEACTIVATE, Object Output Instructions

 



PL/B Language Reference ACTIVATE SPLITTER ACTIVATE STATTEXT