Skip to main content
Version: 20 R6

VP SET FROZEN PANES

VP SET FROZEN PANES ( vpAreaName : Text ; paneObj : Object { ; sheet : Integer } )

ParameterTypeDescription
vpAreaNameText->4D View Pro area form object name
paneObjObject->Object containing frozen column and row information
sheetInteger->Sheet index (current sheet if omitted)

Description

The VP SET FROZEN PANES command sets the frozen status of the columns and rows in the paneObj so they are always displayed in the vpAreaName. Frozen columns and rows are fixed in place and do not move when the rest of the document is scrolled. A solid line is displayed to indicate that columns and rows are frozen. The location of the line depends on where the frozen column or row is on the sheet:

  • Columns on the left or right: For columns on the left of the sheet, the line is displayed on the right side of the last frozen column. For columns on the right side of the sheet, the line is displayed on the left side of the first frozen column.
  • Rows on the top or bottom: For rows at the top of the sheet, the line is displayed below the last frozen row. For rows at the bottom of the sheet, the line is displayed above the first frozen row.

In vpAreaName, pass the name of the 4D View Pro area. If you pass a name that does not exist, an error is returned.

You can pass an object defining the columns and rows to freeze in the paneObj parameter. Setting the value of any of the column or row properties equal to zero resets (unfreezes) the property. If a property is set to less than zero, the command does nothing. You can pass:

PropertyTypeDescription
columnCountIntegerThe number of frozen columns on the left of the sheet
trailingColumnCountIntegerThe number of frozen columns on the right of the sheet
rowCountIntegerThe number of frozen rows on the top of the sheet
trailingRowCountIntegerThe number of frozen rows on the bottom of the sheet

In the optional sheet parameter, you can designate a specific spreadsheet where the range will be defined (counting begins at 0). If omitted, the current spreadsheet is used by default. You can explicitly select the current spreadsheet with the following constant:

  • vk current sheet

Example

You want to freeze the first three columns on the left, two columns on the right, and the first row:

C_OBJECT($panes)

$panes:=New object
$panes.columnCount:=3
$panes.trailingColumnCount:=2
$panes.rowCount:=1

VP SET FROZEN PANES("ViewProArea";$panes)

See also

VP Get frozen panes