4D v16.3

LISTBOX SET ARRAY

Home

 
4D v16.3
LISTBOX SET ARRAY

LISTBOX SET ARRAY 


 

LISTBOX SET ARRAY ( {* ;} object ; arrType ; arrPtr ) 
Parameter Type   Description
Operator in If specified, object is an object name (string) If omitted, object is a variable
object  Form object in Object name (if * is specified) or
Variable (if * is omitted)
arrType  Longint in Type of array
arrPtr  Pointer in Array to associate with property

Note: This command only works with array type list boxes.

The LISTBOX SET ARRAY command associates an arrType array with the list box or list box column designated by the object and * parameters.

Note: Arrays of styles, colors, background colors or row controls can also be associated with array type list boxes using the Property list in the Design mode. 

Passing the optional * parameter indicates that the object parameter is an object name (string). If you do not pass this parameter, it indicates that the object parameter is a variable. In this case, you pass a variable reference instead of a string. You can designate a list box or a list box column in the object parameter.

In arrType, pass the type of array to associate with the list box or column. You can use one of the following constants, available in the "List Box" theme:

Constant Type Value Comment
lk background color array Longint 1
lk control array Longint 3
lk font color array Longint 0
lk row height array Longint 4 (4D View Pro license required)
lk style array Longint 2

In the arrPtr parameter, you pass a pointer to the array to use to support the property type.

You want to reuse the font color array of the 4th column for the 10th column:

  // retrieve a pointer to the array for column 4
 $Pointer:=LISTBOX Get array(*;"Col4";lk font color array)
  // check that it exists
 If(Not(Nil($Pointer)))
  //transfer to column 10
    LISTBOX SET ARRAY(*;"Col10";lk font color array;$Pointer)
 End if

You want to set a row height array for a list box:

 LISTBOX SET ARRAY(*;"LB";lk row height array;->RowHeightArray)

Note: The Row Height Array property for list boxes requires a 4D View Pro license. For more information, refer to 4D View Pro.



See also 

LISTBOX Get array
LISTBOX GET ARRAYS

 
PROPERTIES 

Product: 4D
Theme: List Box
Number: 1279

 
HISTORY 

New
Created: 4D v14
Modified: 4D v15 R4
Modified: 4D v16

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)