LISTBOX Get property
LISTBOX Get property ( {* ;} object ; property ) : any
Parámetros | Tipo | Descripción | |
---|---|---|---|
* | Operador | → | Si se especifica, object es un nombre de objeto (cadena). Si se omite, object es una variable |
object | any | → | Nombre del objeto (si se especifica *) o Variable (si se omite *) |
property | Integer | → | Propiedad cuyo valor desea obtener |
Resultado | Integer, Text | ← | Valor actual |
Descripción
El comando LISTBOX Get property devuelve el valor de property del list box o columna especificado mediante los parámetros object y *.
Si pasa el parámetro opcional *, indica que el parámetro object es un nombre de objeto (cadena). Si no pasa este parámetro, indica que el parámetro object es una variable. En este caso, se pasa una referencia a una variable en lugar de una cadena. Para más información sobre los nombres de los objetos, consulte la sección Propiedades de los objetos.
Nota: si el list box o columna especificado utilizando los parámetros object y * no existe, el comando LISTBOX Get property devuelve -1 para propiedades numéricas, o una cadena vacía.
En el parámetro property, pase una constante que indique la propiedad cuyo valor desea obtener. Puede utilizar una de las siguientes constantes del tema "List Box":
Constante | Valor | Comentario |
---|---|---|
lk allow wordwrap | 14 | Propiedad Ajustar palabra Se aplica a: columna * Valores posibles: lk no (0) lk yes (1) |
lk auto row height | 31 | Propiedad Alto de línea automático para list box de tipo array Se aplica a: List box o columna Valores posibles: lk no (0) lk yes (1) |
lk background color expression | 22 | Propiedad Expresión color de fondo para los list box de tipo selección de registros, colección o selección de entidades Se aplica a: list box o columna |
lk cell horizontal padding | 36 | Propiedad Margen horizontal Margen horizontal de celda en píxeles (mismo valor para las márgenes izquierda y derecha) Se aplica a: list box, columna, encabezado, pie de página |
lk cell vertical padding | 37 | Propiedad Margen vertical Margen vertical de celda en píxeles (mismo valor para las márgenes superior e inferior) Se aplica a: list box, columna, encabezado, pie de página |
lk column max width | 26 | Propiedad Ancho Máximo Se aplica a: Columna * |
lk column min width | 25 | Propiedad Ancho mínimo Se aplica a: Columna * |
lk column resizable | 15 | Propiedad Redimensionable Se aplica a: columna * Valores posibles: lk no (0) lk yes (1) |
lk detail form name | 19 | Propiedad Nombre formulario detallado para list box de tipo selección Se aplica a: List box |
lk display footer | 8 | Propiedad Mostrar pies de página Se aplica a: list box Valores posibles: lk no (0): oculto lk yes (1): mostrado |
lk display header | 0 | Propiedad Mostrar encabezados Se aplica a: list box Valores posibles: lk no (0): oculto lk yes (1): mostrado |
lk display type | 21 | Display Type property for numeric columns Applies to: Column * Possible values: lk numeric format (0): displays values in numeric format lk three states checkbox (1): displays values as three-state checkboxes |
lk double click on row | 18 | Double-click on row property for selection type list box Applies to: List box Possible values: lk do nothing (0): does not trigger any automatic action lk edit record (1): displays corresponding record in read-write mode lk display record (2): displays corresponding record in read-only mode |
lk extra rows | 13 | Hide extra blank rows property Applies to: List box Possible values: lk display (0) lk hide (1) |
lk font color expression | 23 | Font Color Expression property for record selection, collection or entity selection type list boxes Applies to: List box or column |
lk font style expression | 24 | Style Expression property for record selection, collection or entity selection type list boxes Applies to: List box or column |
lk hide selection highlight | 16 | Hide selection highlight property Applies to: List box Possible values: lk no (0) lk yes (1) |
lk highlight set | 27 | Highlight Set property for selection type list box Applies to: List box |
lk hor scrollbar height | 3 | Altura en píxeles |
lk meta expression | 34 | Meta Info Expression property for collection or entity selection type list boxes Applies to: List box |
lk movable rows | 35 | Movable Rows property for array type list box Applies to: List box (excluding hierarchical mode) Possible values: lk no (0): Rows cannot be moved at runtime lk yes (1): Rows can be moved at runtime (default) |
lk multi style | 30 | Multi-style property Applies to: Column * Possible values: lk no (0) lk yes (1) |
lk named selection | 28 | Named Selection property for selection type list box Applies to: List box |
lk resizing mode | 11 | Column Auto-Resizing property Applies to: List box Possible values: lk manual (0) lk automatic (2) |
lk row height unit | 17 | Unit of Row Height property Applies to: List box Possible values: lk lines (1) lk pixels (0) |
lk selection mode | 10 | Selection Mode property Applies to: List box Possible values: lk none (0) lk single (1) lk multiple (2) |
lk single click edit | 29 | Single-Click Edit property Applies to: List box Possible values: lk no (0) lk yes (1) |
lk sortable | 20 | Sortable property Applies to: List box Possible values: lk no (0) lk yes (1) |
lk truncate | 12 | Truncate with ellipsis property Applies to: List box or column Possible values: lk without ellipsis (0) lk with ellipsis (1) |
lk ver scrollbar width | 5 | Ancho en píxeles |
lk current item expression | 38 | Current item property Applies to: List box (Collection / Entity selection) |
lk current item pos expression | 39 | Current item position property Applies to: List box (Collection / Entity selection) |
lk selected items expression | 40 | Selected items property Applies to: List box (Collection / Entity selection) |
* 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. Más específicamente, esto ocurre en los siguientes casos:
- Si pasa una property que no existe
- If you pass a property that is not available for the specified list box or column, e.g. you pass the lk font color expression property with an array type list box
- If you pass a column as parameter with a property that is applied to a list box, and vice versa if you pass a list box as parameter with a property that is applied to a column (see * above)
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.
Note:
- Las constantes lk display footer y lk display header son útiles para calcular el tamaño real del área de un list box en un formulario.
Ejemplo 1
Given a listbox "MyListbox", if you execute the following statement:
$Value:=LISTBOX Get property(*; "MyListbox";lk selection mode) // el valor devuelto indica el modo de selección
In this case, the result returned indicates whether multiple rows can be selected.
Ejemplo 2
Given a list box "MyListbox", if you execute the following statement:
$resizable:=LISTBOX Get property(*;"MyListbox";lk column resizable)
LISTBOX Get property devuelve -1 porque la propiedad lk column resizable se aplica a columnas y se ha pasado un list box como parámetro.
Ver también
LISTBOX SET GRID
LISTBOX SET PROPERTY
OBJECT SET SCROLLBAR
Propiedades
Número de comando | 917 |
Hilo seguro | ✗ |