| 4D v18LISTBOX Get property | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v18
 LISTBOX Get property 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| LISTBOX Get property ( {* ;} object ; property ) -> Function result | ||||||||
| 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 specified) or Variable (if * is omitted) | |||||
| property | Longint |   | Property whose value you want to get | |||||
| Function result | Longint, String |   | Current value | |||||
The LISTBOX Get property command returns the value of the property of the list box or column specified using 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 pass a variable reference instead of a string. For more information about object names, refer to the Object Properties section.
Note: If the list box or column specified using the object and * parameters does not exist, the LISTBOX Get property command returns -1 for numeric properties, or an empty string.
In the property parameter, pass a constant indicating the property whose value you want to get. You can use one of the following constants from the “List Box” theme:
| Constant | Type | Value | Comment | 
| _o_lk display hor scrollbar | Longint | 2 | ***Constant deprecated*** Use OBJECT GET SCROLLBAR command. | 
| _o_lk display ver scrollbar | Longint | 4 | ***Constant deprecated*** Use OBJECT GET SCROLLBAR command. | 
| _o_lk footer height | Longint | 9 | ***Constant deprecated*** Use LISTBOX Get footers height command. | 
| _o_lk header height | Longint | 1 | ***Constant deprecated*** Use LISTBOX Get headers height command. | 
| _o_lk hor scrollbar position | Longint | 6 | ***Constant deprecated*** Use OBJECT GET SCROLL POSITION command. | 
| _o_lk ver scrollbar position | Longint | 7 | ***Constant deprecated*** Use OBJECT GET SCROLL POSITION command. | 
| lk allow wordwrap | Longint | 14 | Wordwrap property Applies to: Column* Possible values: 
 | 
| lk auto row height | Longint | 31 | Automatic row height property for array type list box Applies to: List box or column Possible values: 
 4D View Pro only: This feature requires a 4D View Pro license. For more information, refer to 4D View Pro Reference. | 
| lk background color expression | String | 22 | Background Color Expression property for selection type list box Applies to: List box or column | 
| lk column max width | Longint | 26 | Maximum Width property Applies to: Column* | 
| lk column min width | Longint | 25 | Minimum Width property Applies to: Column* | 
| lk column resizable | Longint | 15 | Resizable property Applies to: Column* Possible values: 
 | 
| lk detail form name | String | 19 | Detail Form Name property for selection type list box Applies to: List box | 
| lk display footer | Longint | 8 | Display Footers property Applies to: List box Possible values: 
 | 
| lk display header | Longint | 0 | Display Headers property Applies to: List box Possible values: 
 | 
| lk display type | Longint | 21 | Display Type property for numeric columns Applies to: Column* Possible values: 
 | 
| lk double click on row | Longint | 18 | Double-click on row property for selection type list box Applies to: List box Possible values: 
 | 
| lk extra rows | Longint | 13 | Hide extra blank rows property Applies to: List box Possible values: 
 | 
| lk font color expression | String | 23 | Font Color Expression property for selection type list box Applies to: List box or column | 
| lk font style expression | String | 24 | Style Expression property for selection type list box Applies to: List box or column | 
| lk hide selection highlight | Longint | 16 | Hide selection highlight property Applies to: List box Possible values: 
 | 
| lk highlight set | String | 27 | Highlight Set property for selection type list box Applies to: List box | 
| lk hor scrollbar height | Longint | 3 | Height in pixels | 
| lk multi style | Longint | 30 | Multi-style property Applies to: Column* Possible values: 
 | 
| lk named selection | String | 28 | Named Selection property for selection type list box Applies to: List box | 
| lk resizing mode | Longint | 11 | Column Auto-Resizing property Applies to: List box Possible values: 
 | 
| lk row height unit | Longint | 17 | Unit of Row Height property Applies to: List box Possible values: 
 | 
| lk selection mode | Longint | 10 | Selection Mode property Applies to: List box Possible values: 
 | 
| lk single click edit | Longint | 29 | Single-Click Edit property Applies to: List box Possible values: 
 | 
| lk sortable | Longint | 20 | Sortable property Applies to: List box Possible values: 
 | 
| lk truncate | Longint | 12 | Truncate with ellipsis property Applies to: List box or column Possible values: 
 | 
| lk ver scrollbar width | Longint | 5 | Width in pixels | 
*These properties only apply to list box columns; if you pass a list box as parameter with one of these properties, LISTBOX Get property returns -1, or an empty string, depending on the property passed.
In general, to signal an invalid result LISTBOX Get property returns -1 when retrieving properties that have numeric values, or an empty string; however, no errors are generated. More specifically, this occurs in the following cases:
In addition, it is not possible to return values from more than one column at a time; if you attempt to use the "@" symbol as part of a column name to indicate multiple columns with similar names, LISTBOX Get property returns the first matching value it finds; as a result, the value returned has no true significance.
Notes:
Given a listbox "MyListbox", if you execute the following statement:
 $Value:=LISTBOX Get property(*;"MyListbox";lk selection mode) // value returned indicates selection modeIn this case, the result returned indicates whether multiple rows can be selected.
Given a list box "MyListbox", if you execute the following statement:
 $resizable:=LISTBOX Get property(*;"MyListbox";lk column resizable)LISTBOX Get property returns -1 because the lk column resizable property applies to columns and a list box was passed as parameter.
	Product:  4D
	Theme:  List Box
	Number:  
        917
        
        
        
	
	Modified:  4D 2004.1
	Renamed: 4D v12
	Modified:  4D v13
	Renamed: 4D v16 R2
	Modified:  4D v16 R2
	Modified:  4D v16 R5
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v18)
	
	
	
	
 Add a comment
Add a comment