4D v16.3

LISTBOX Get array

Home

 
4D v16.3
LISTBOX Get array

LISTBOX Get array 


 

LISTBOX Get array ( {* ;} object ; arrType ) -> Function result 
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
Function result  Pointer in Pointer to array associated with property

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

The LISTBOX Get array command returns a pointer to the arrType array of the list box or list box column designated by the object and * parameters.

Style, color, background color or row control arrays can be associated with array type list boxes or (except for row control arrays) with the columns of array type list boxes, using the Property list in Design mode or using the LISTBOX SET ARRAY command. 

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 for the property you want to get. 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

The command returns one of the following values:

  • Nil if no array for the requested property is associated with the column or the list box.
  • a pointer to the array of the requested property, defined by the user.
  • a pointer to the array of the requested property, defined dynamically when calling the LISTBOX SET ROW COLOR or LISTBOX SET ROW FONT STYLE command.

Example  

Typical examples of use:

 vPtr:=LISTBOX Get array(*;"MyLB";lk font color array)
  // returns a pointer to the font color array
  // associated with the "MyLB" list box
 
 vPtr:=LISTBOX Get array(*;"Col4";lk style array)
  // returns a pointer to the font style array
  // associated with the columns of the "Col4" list box



See also 

LISTBOX GET ARRAYS
LISTBOX SET ARRAY

 
PROPERTIES 

Product: 4D
Theme: List Box
Number: 1278

 
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)