PrtPreviewAction Method (PANEL)


PLBCMP GUI Only, 9.4D

 

The PrintPreviewAction method performs specialized actions to manipulate and control the Advanced Print Preview window that has been created on a PANEL object window. This method uses the following format:

 

[label]

{object}.PrtPreviewAction

[GIVING {return}]:

 

 

USING [*Action=]{action}[:

 

 

[*Value=]{parameter}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A Panel that is created.

return

Optional. A Numeric Variable that indicates the success or failure of the method or receives the result of an action inquiry that returns numeric data as per the action being executed.

action

Required. A Numeric Variable or decimal value that specifies the action to be executed for the Advanced Print Preview window that is created on the PANEL object window.

parameter

Optional. A Numeric Variable or decimal value that clarifies the specific operation for the {action} being executed.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. If the value returned is zero, the ZERO Condition Flag is set.

  2. The EOS Condition Flag is always cleared.

  3. The OVER Condition Flag is set if the {return} variable it too small to receive the method result without truncation.

  4. The following {action} values are supported for this method:
     

  5. Action

    Value

    Parameter

    $PPA_GotoPage

    1

    A page number that is to be presented in the Advanced Print Preview window on the PANEL window. The value is specified as a one based number.

    $PPA_NextPage

    2

    not used

    $PPA_PrevPage

    3

    not used

    $PPA_FirstPage

    4

    not used

    $PPA_LastPage

    5

    not used

    $PPA_ZoomIn

    6

    not used

    $PPA_ZoomOut

    7

    not used

    $PPA_Scale

    8

    A numeric value specifying a percent.

    $PPA_GetInfo

    9

    A numeric value specifying a sub command

    $PPA_SetHorzPos

    10

    Numeric value of position

    $PPA_SetVertPos

    11

    Numeric value of position

    $PPA_SetKeystroke

    12

    a virtual keystroke value that is applied to the Advanced Print Preview window.

 

  1. The Advanced Print Preview window zooms in by increments of 25% each time the $PPA_ZoomIn action is executed.

  2. The Advanced Print Preview window zooms out by increments of 25% each time the $PPA_ZoomOut action is executed.

  3. If the {value} is specified as zero for a $PPA_Scale action, the Advanced Print Preview window is set to perform the autofit mode where the print page is scaled to best fit the PANEL window. If the {value} is specified as a positive number, the value specifies a percent by which the print page is scaled within the PANEL window.

  4. The following subcommand values are supported for the $PPA_GetInfo action:
     

  5. Subcommand

    Data Returned

    1

    current page number

    2

    first page number

    3

    last page number

    4

    position for the horizontal scrollbar

    5

    maximum position for the horizontal scrollbar

    6

    position for the vertical scrollbar

    7

    maximum position for the vertical scrollbar

    8

    current scaling factor for the Advanced Print Preview window.

 

  1. For the $PPA_SetHorzPos action, {value} is the new position for the horizontal scrollbar.

  2. For the $PPA_SetVertPos action, {value} is the new position for the vertical scrollbar.

  3. The following subcommand values are supported for the $PPA_SetKeystroke action:
     

  4. Subcommand

    Keystroke

    Data Returned

    1

    VK_UP

    Move up one line

    2

    VK_DOWN

    Move down one line

    3

    VK_LEFT

    Scroll left

    4

    VK_RIGHT

    Scroll right

    5

    VK_PRIOR

    Move up one page

    6

    VK_NEXT

    Move up down page

     

  5. This method is not available when using the PL/B Web Server.

 

See Also: Panel Methods, Method Syntax



PL/B Language Reference InnerHTML Method PrtPreviewClose Method (PANEL)