Command PV ADD HOR SPLITTER

4D View

PV ADD HOR SPLITTER

version 6.8


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

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

Description

The PV ADD HOR SPLITTER command creates a new horizontal splitter in area, whose number is passed in splitter. The splitter is created at position pixels from the last splitter of the area or, if the area does not contain a splitter, from the upper border of the area (outside of toolbars).

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 height of the column headers, which it is possible to recover using the PV Get area property command, by passing the pv column headers height constant as the second parameter.

• The minimum height of a horizontal pane is 8 pixels.

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

Example

Add a horizontal pane, 30 pixels high, following panes that are already in the area.

   C_LONGINT($HorPaneNum)  `Number of existing horizontal panes
   C_LONGINT($Position)  `Position of pane

      `Number of horizontal panes
   $HorPaneNum:=PV Get area property (Area;pv hor pane count )
   $Position:=30  ` 30 pixels high
   PV ADD HOR SPLITTER(Area;$HorPaneNum;$Position;0)  `Resizable

See Also

PV ADD VERT SPLITTER, PV REMOVE HOR SPLITTER.

Error Handling

If the PV ADD HOR 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.