Command PV ADD VERT SPLITTER

4D View

PV ADD VERT SPLITTER

version 6.8


PV ADD VERT SPLITTER (area; splitter; position; locked)

ParameterTypeDescription
areaLongint4D View area
splitterIntegerVertical separator number
positionIntegerPosition of separator with respect to
the last separator in pixels
lockedInteger0 = Unlocked; 1 = Locked

Description

The PV ADD VERT SPLITTER command creates a new vertical splitter in area, whose number is passed in splitter. The splitter is created at position pixels from the left border of area.

If the locked parameter is equal to 1, the pane cannot be resized manually. If it is equal to 0, the pane can be resized freely by the user.

Notes:

• The position of the pane includes the width of the row headers, which it is possible to recover using the PV Get area property command, by passing the pv row headers width constant as the second parameter.

• The minimum width of a vertical pane is 8 pixels.

• You can see the number of vertical panes in an area using the PV Get area property command by passing the pv vert pane count constant as the second parameter. In this case, PV Get area property returns 1 when there is not a vertical splitter yet: the single pane is, in this case, the entire area.

Example

Take a spreadsheet containing twenty or so columns: the first contains a reference (for example, product code), which must absolutely remain visible, regardless of the cell being modified by the user. We will then create a vertical pane to display this column A.

   C_LONGINT($ColumnWidth)  `Width of column A (in pixels)
   $ColumnWidth:=PV Get column width(Area; 1)  `Column A
   PV ADD VERT SPLITTER(Area;1;$ColumnWidth;0)  `Resizable
   

See Also

PV ADD HOR SPLITTER, PV REMOVE VERT SPLITTER.

Error Handling

If the PV ADD VERT SPLITTER command is executed when the area is in"frozen pane" mode, the error 92 (No splitter can be added when panes are frozen) is generated.