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

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).

  1. Setting of values: Object.attrib := value

     

    SingleSelection

    MultiSelection

    boolean active[I]

    not allowed

    item i

    integer activeitem

    number of active item

    not allowed

  2. 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

Attributes .active, .multisel