Saltar para o conteúdo principal
Versão: 21

LISTBOX Get property

LISTBOX Get property ( * ; object : Text ; property : Integer ) : any
LISTBOX Get property ( object : Variable ; property : Integer ) : any

ParâmetroTipoDescrição
*OperadorIf specified, object is an object name (string). If omitted, object is a variable
objectText, VariableForm object name (if * is specified) or Variable (if * is omitted)
propertyIntegerProperty whose value you want to get
ResultadoanyCurrent value (Integer, Text)
História
ReleaseMudanças
19 R6Modificado
16 R2Renamed (Get Listbox information)
<6Created

Descrição

The LISTBOX Get property command returns the value of the property of the list box or column specified using the object and * parameters.

Se você passar o parâmetro opcional *, estará indicando que o parâmetro object é um nome de objeto (string). Se você não passar esse parâmetro, estará indicando que o parâmetro object é uma variável. 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. Você pode usar uma das seguintes constantes do tema "List Box":

ParâmetrosValorComentário
lk allow wordwrap14Wordwrap property
Applies to: Column *
Possible values:
lk no (0)
lk yes (1)
lk auto row height31Automatic row height property for array type list box
Applies to: List box or column
Possible values:
lk no (0)
lk yes (1)
lk background color expression22Background Color Expression property for record selection, collection or entity selection type list boxes
Applies to: List box or column
lk cell horizontal padding36Horizontal Padding property
Cell horizontal padding in pixels (same value for left and right padding)
Applies to: List box, column, header, footer
lk cell vertical padding37Vertical Padding property
Cell vertical padding in pixels (same value for top and bottom padding)
Applies to: List box, column, header, footer
lk column max width26Maximum Width property
Applies to: Column *
lk column min width25Minimum Width property
Applies to: Column *
lk column resizable15Resizable property
Applies to: Column *
Possible values:
lk no (0)
lk yes (1)
lk current item expression38Current item property
Applies to: List box (Collection / Entity selection)
lk current item pos expression39Current item position property
Applies to: List box (Collection / Entity selection)
lk detail form name19Detail Form Name property for selection type list box
Applies to: List box
lk display footer8Display Footers property
Applies to: List box
Possible values:
lk no (0): hidden
lk yes (1): shown
lk display header0Display Headers property
Applies to: List box
Possible values:
lk no (0): hidden
lk yes (1): shown
lk display type21Display 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 row18Double-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 rows13Hide extra blank rows property
Applies to: List box
Possible values:
lk display (0)
lk hide (1)
lk font color expression23Font Color Expression property for record selection, collection or entity selection type list boxes
Applies to: List box or column
lk font style expression24Style Expression property for record selection, collection or entity selection type list boxes
Applies to: List box or column
lk hide selection highlight16Hide selection highlight property
Applies to: List box
Possible values:
lk no (0)
lk yes (1)
lk highlight set27Highlight Set property for selection type list box
Applies to: List box
lk hor scrollbar height3Height in pixels (can only be read)
Applies to: List box
lk meta expression34Meta Info Expression property for collection or entity selection type list boxes
Applies to: List box
lk movable rows35Movable 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 style30Multi-style property
Applies to: Column *
Possible values:
lk no (0)
lk yes (1)
lk named selection28Named Selection property for selection type list box
Applies to: List box
lk resizing mode11Column Auto-Resizing property
Applies to: List box
Possible values:
lk manual (0)
lk automatic (2)
lk row height unit17Unit of Row Height property
Applies to: List box
Possible values:
lk lines (1)
lk pixels (0)
lk selection mode10Selection Mode property
Applies to: List box
Possible values:
lk none (0)
lk single (1)
lk multiple (2)
lk single click edit29Single-Click Edit property
Applies to: List box
Possible values:
lk no (0)
lk yes (1)
lk sortable20Sortable property
Applies to: List box
Possible values:
lk no (0)
lk yes (1)
lk truncate12Truncate with ellipsis property
Applies to: List box or column
Possible values:
lk without ellipsis (0)
lk with ellipsis (1)
lk ver scrollbar width5Width in pixels (can only be read)
Applies to: List box

* 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:

  • Se você passar uma property que não 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:

  • As constantes lk display footer e lk display header são úteis para calcular o tamanho real da área de um list box em um formulário.

Exemplo 1

Given a listbox "MyListbox", if you execute the following statement:

 $Value:=LISTBOX Get property(*; "MyListbox";lk selection mode) // o valor retornado indica o modo de seleção

In this case, the result returned indicates whether multiple rows can be selected.

Exemplo 2

Given a list box "MyListbox", if you execute the following statement:

 $resizable:=LISTBOX Get property(*;"MyListbox";lk column resizable)

LISTBOX Get property retorna -1 porque a propriedade lk column resizable se aplica a colunas e um list box foi passada como parâmetro.

Veja também

LISTBOX SET GRID
LISTBOX SET PROPERTY
OBJECT SET SCROLLBAR

Propriedades

Número de comando917
Thread safenão