4D v14.3LISTBOX DUPLICATE COLUMN |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
LISTBOX DUPLICATE COLUMN
LISTBOX DUPLICATE COLUMN
The LISTBOX DUPLICATE COLUMN command duplicates the column designated by the object and * parameters by programming in the context of the form being executed (Application mode). The original form, generated in the Design mode, is not modified. Note: This functionality was already found in 4D, in Design mode only, using the Duplicate Column command found in the context menu of the Form editor. By default, all style options (size, color, formats, etc.) set for the source column by means of the Property list or using object management commands (OBJECT SET COLOR, etc.) are applied to the copy. The object method and the settings of the form events are also duplicated. The object and * parameters designate the column to duplicate. Passing the optional * parameter indicates that the object parameter is an column name (string). If you do not pass this parameter, it indicates that the object parameter is a column variable. In this case, you pass a variable reference instead of a string. Note: This command does nothing when it is applied to the first column of a list box displayed in hierarchical mode. The new duplicated column is placed just before the column designated by the colPosition parameter. If the colPosition parameter is greater than the total number of columns, then the duplicated column is placed after the last column. In the colName and colVariable parameters, pass the object name and the variable of the new duplicated column.
Remember that the data source of the original column is not duplicated: you must set a source variable, array or field for the new duplicated column. In the headerName and headerVariable parameters, pass the object name and variable for the header of the new duplicated column. You can also pass the object name and variable for the footer of the inserted column in the footerName and footerVariable parameters. If you omit the footerVariable parameter, 4D uses a dynamic variable. Note: Object names must be unique in a form. You must make sure that the names passed in the colName, headerName and footerName parameters have not already been used. Otherwise, the column is not duplicated and an error is generated. This command must be used in the context of displaying a form. It is usually called in the On Load form event or following a user action (On Clicked event). In an array type list box, we want to duplicate the "First Name" column, ready for input: Here is the code of the button: ARRAY TEXT(arrFirstNames2;Records in table([Members])) When you click on the button, the list box appears as follows: |
PROPERTIES
Product: 4D
HISTORY
SEE ALSO ARTICLE USAGE
4D Language Reference ( 4D v14 R2) Parent of : LISTBOX DUPLICATE COLUMN ( 4D v14 R3) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||