PF-Shift-Panel (Value 4)

Moves a window and/or changes its size.

Parameters:

PPB-First-Visible-Col pic 9(4) comp-x.
PPB-First-Visible-Row pic 9(4) comp-x.
PPB-Panel-ID pic 9(4) comp-x.
PPB-Panel-Start-Column pic 9(4) comp-x.
PPB-Panel-Start-Row pic 9(4) comp-x.
PPB-Visible-Height pic 9(4) comp-x.
PPB-Visible-Width pic 9(4) comp-x.

On Entry:

PPB-First-Visible-Col The new horizontal position of the window within the panel. A value of 0 indicates that the left-hand edge of the window is positioned on the left-hand edge of the panel.
PPB-First-Visible-Row The new vertical position of the window within the panel. A value of 0 indicates that the top edge of the window is positioned on the top edge of the panel.
PPB-Panel-ID The identifying handle of the panel whose appearance you want to change. This value is returned from a call to PF-Create-Panel.
PPB-Panel-Start-Column The new horizontal position of the panel on the screen. A value of 0 indicates that the top edge of the panel is positioned on the left-hand edge of the screen.
PPB-Panel-Start-Row The new vertical position of the panel on the screen. A value of 0 indicates that the top edge of the panel is positioned on the top edge of the screen.
PPB-Visible-Height The new number of rows of text in the visible window.
PPB-Visible-Width The new number of columns of text in the visible window.

On Exit:

None

Comments:

All of the fields except PPB-Panel-Height and PPB-Panel-Width can be changed using this function - once you have defined the size of a panel it cannot be changed. If you specify any values for PPB-Panel-Height and PPB-Panel-Width they are ignored.

If you do not want to change the values already assigned to the window, you can use PF-Get-Panel-Info to learn the current size and position of the window and set these again.

Any changes you make to the size or position of a window are visible only if you have enabled the panel associated with the window. However, you can change the window while the panel is disabled. The changes are displayed the next time you use PF-Enable-Panel to enable the panel.

Example:

This example assumes a panel has been defined that is 80 characters wide and 20 rows deep. The panel starts on line 1, column 1 of the screen. The window into the panel is currently 80 columns wide and 5 rows deep and starts in the first position (top left-hand corner) of the panel. The handle of this panel was saved in the data item ws-save-panel-id

This example makes more of the panel visible by increasing the visible portion of the window from 5 rows to 10 rows. All other parameters remain the same.

* Window starts in screen line 1, column 1. Remember that 
* when the location of the window on the screen is defined, 
* it is relative to 0 (that is line 0, row 0 is the top 
* left hand corner of the screen).
       move 0 to ppb-panel-start-column.
       move 0 to ppb-panel-start-row.
* The window into the panel is 20 columns wide by 10 rows 
* deep.
       move 20 to ppb-visible-width.
       move 10 to ppb-visible-height.
* The window starts at line 1, col 1 of the screen (where 
* 0,0 is the top left-hand corner of the screen).
       move 0 to ppb-first-visible-col.
       move 0 to ppb-first-visible-row.
* When the panel was first created, the returned panel ID 
* was saved in a Working-Storage variable ws-save-panel-id. 
* Now Panels needs to know which panel the call applies to.
       move ws-save-panel-id to ppb-panel-id.
* Move the window.
       move pf-shift-panel to ppb-function.
       call "PANELS" using panels-parameter-block.
       if ppb-status not = zero
*          (code to abort)