INSERT LISTBOX COLUMN

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004


INSERT LISTBOX COLUMN ({*; }object; colPosition; colName; colVariable; headerName; headerVar)

ParameterTypeDescription
*If specified, object is an object name (string)
If omitted, object is a variable
objectForm objectObject name (if * is set) or
Variable (if * is omitted)
colPositionNumberLocation of column to insert
colNameStringName of the column object
colVariableArrayName of the column variable
headerNameStringName of the column header object
headerVarInteger variableColumn header variable

Description

The INSERT LISTBOX COLUMN command inserts a column in the list box set by the object and * parameters.

If you pass the optional * parameter, you indicate that the object parameter is an object name (string). If you do not pass this parameter, you indicate that the object parameter is a variable. In this case, you do not pass a string, but a variable reference. For more information about object names, refer to the Object Properties section.

The new column is inserted just in front of the column set using the colPosition parameter. If the colPosition parameter is greater than the total number of columns, the column is added after the last column.

Pass the name of the object and the variable of the inserted column in the colName and colVariable parameters. The name of the variable must match the name of the array whose contents will be displayed in the column.

Pass the object name and the variable of the inserted column header in the headerName and headerVar parameters.

Note: Object names must be unique in a form. You must be sure that the names passed in the colName and headerName parameters are not already used. Otherwise, the column is not created and an error is generated.

Example

We would like to add a column at the end of the list box:

   C_LONGINT(HeaderVarName;$Last;RecNum)
   ALL RECORDS([Table 1])
   $RecNum:=Records in table([Table 1])
   ARRAY PICTURE(Picture;$RecNum)

   $Last:=Get number of listbox columns(*;"ListBox1")+1
   INSERT LISTBOX COLUMN(*;"ListBox1";$Last;"ColumnPicture";Picture;"HeaderPicture";HeaderVarName)

See Also

DELETE LISTBOX COLUMN.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next