4D v14.3LISTBOX INSERT COLUMN |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
LISTBOX INSERT COLUMN
|
LISTBOX INSERT COLUMN ( {* ;} object ; colPosition ; colName ; colVariable ; headerName ; headerVar {; footerName ; footerVar} ) | ||||||||
Parameter | Type | Description | ||||||
* | Operator |
![]() |
If specified, object is an object name (string) If omitted, object is a variable | |||||
object | Form object |
![]() |
Object name (if * is set) or Variable (if * is omitted) | |||||
colPosition | Longint |
![]() |
Location of column to insert | |||||
colName | String |
![]() |
Name of the column object | |||||
colVariable | Array, Field, Variable |
![]() |
Column array name or field or variable | |||||
headerName | String |
![]() |
Name of the column header object | |||||
headerVar | Integer variable |
![]() |
Column header variable | |||||
footerName | String |
![]() |
Column footer object name | |||||
footerVar | Variable |
![]() |
Column footer variable | |||||
The LISTBOX INSERT COLUMN command inserts a column in the list box set by the object and * parameters.
Note: This command does nothing if it is applied to the first column of a list box displayed in hierarchical mode.
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 pass a variable reference instead of a string. 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.
In the context of list boxes based on selections, LISTBOX INSERT COLUMN can be used to insert simple elements (fields or variables). If you want to handle more complex expressions (such as formulas or methods), you must use the LISTBOX INSERT COLUMN FORMULA command.
Note: It is not possible to combine columns of the array type (array data source) and those of the field or variable type (selection data source) in the same list box.
Pass the object name and the variable of the inserted column header in the headerName and headerVar parameters.
In the footerName and footerVar parameters, you can also pass the object name and variable of the footer of the inserted column.
Note: Object names must be unique in a form. You must be sure that the names passed in the colName, headerName and footerName parameters are not already used. Otherwise, the column is not created and an error is generated.
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:=LISTBOX Get number of columns(*;"ListBox1")+1
LISTBOX INSERT COLUMN(*;"ListBox1";$Last;"ColumnPicture";Picture;"HeaderPicture";HeaderVarName)
We would like to add a column to the right of the list box and associate the values of the [Transport]Fees field with it:
$last:=LISTBOX Get number of columns(*;"ListBox1")+1
LISTBOX INSERT COLUMN(*;"ListBox1";$last;"FieldCol";[Transport]Fees;"HeaderName";HeaderVar)
Product: 4D
Theme: List Box
Number:
829
Modified: 4D v11 SQL
Renamed: 4D v12
Modified: 4D v13
LISTBOX DELETE COLUMN
LISTBOX INSERT COLUMN FORMULA
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
Inherited from :
LISTBOX INSERT COLUMN ( 4D v12.4)
Parent of :
LISTBOX INSERT COLUMN ( 4D v14 R3)