Previous Topic Next topic Print topic


Clipping a Panel

When a panel is created or the window is moved or resized using PF-Shift-Panel, the size of the window specified is validated by Panels and is reduced in size if a window of the specified size cannot be created. This is known as clipping the height and/or width of the window.

The window can be reduced in size for two reasons. The following examples describe how the width of the window is affected. The height is affected in a similar way, but depending on the values of PPB-Panel-Start-Row and PPB-First-Visible-Row instead of PPB-Panel-Start-Column and PPB-First-Visible-Col:

  1. PPB-Panel-Start-Column is too large. If the value of the start column is such that a window of the specified size would be off the right-hand edge of the screen, the width of the window is reduced to fit on the screen.

    For example, for a screen that is 80 characters wide, a window is defined that is 40 characters wide (PPB-Visible-Width = 40). If the window starts with the 60th character of the screen (PPB-Panel-Start-Column = 60) the screen would have to be 100 characters wide for the entire window to fit on the screen. Because the screen is only 80 characters wide, PPB-Visible-Width is clipped by 20 characters (PPB-Visible-Width is reduced to 20).

  2. PPB-First-Visible-Col is too large. If the value of the start column within the panel is such that a window of the specified size would be off the right-hand edge of the panel, the width of the window is reduced so that it is completely in the panel.
  3. For example, if a panel has been created with a width of 40 (PPB-Panel-Width = 40), and a window width of 30 (PPB-Visible-Width = 30) and a start position in the panel of 15 is specified, (PPB-First-Visible-Col = 15), Panels automatically reduces the width of the window to 25 (PPB-Panel-Width is reduced to 25).

The width or height of a window can be reduced to 0, in which case the window disappears from the display. It does, however, retain its order in the stack of panels on the screen (unlike the results of making a call to PF-Disable-Panel).

A panel is moved to the right by increasing the value in PPB-Panel-Start-Column. As the right-hand edge of the screen is reached, Panels starts to clip the width so that the panel appears to disappear off the right-hand edge of the screen.

A panel is moved to the left by decreasing the value in PPB-Panel-Start-Column. When this reaches 0, the left-hand edge of the screen has been reached. To give the impression of the panel disappearing off the left-hand edge of the screen, the value of PPB-First-Visible-Col is increased. The width of the window is reduced by Panels as a result and the panel appears to slide off the edge of the screen.

Previous Topic Next topic Print topic