2.8 .activeitem
The index of the currently displayed text can be requested and set with the attribute .activeitem.
Definition
-
Data type
integer (listbox, poptext, spinbox)
index (tablefield)
-
Access
get, set
-
changed event
yes

-
C
Data type: DT_integer, DT_index
-
COBOL
Data type: DT-integer, DT-index
-
Classification
object-specific attribute
-
Objects
With list objects and poptexts an error occurs, when it is tried to set .activeitem to a non-existent text entry. Therefore within static object declarations the definition of the text entry must be placed before the assignment to .activeitem in dialog scripts.
Meaning of .active and .activeitem for Listbox and Tablefield
.activeitem accesses the selected item in objects with single selection (multisel = false).
-
Setting of values:
Object.attrib := value
SingleSelection
MultiSelection
boolean active[I]
not allowed
item i
integer activeitem
number of active item
not allowed
-
Request of values:
? := Object.attrib
SingleSelection
MultiSelection
boolean active[I]
selection state of
selection state of
item i
item i
integer activeitem
number of active item
not allowed
Note
You have to set .activeitem = 0, if no item shall be selected in a listbox or tablefield.
See Also