Tag

[property icon] Tag$

Free text field available to programmers

String property

Applies to: Generic


[property icon] Tag$

Per item property for programmer use

Runtime-only String property

Applies to: Grid , GridCell , MenuItem

Introduced in KCML version 6.00


[property icon] Tag$

Tag of a tabbed item

String property

Applies to: ListItem , TabbedItem , TreeItem

Introduced in KCML version 5.03


[property icon] Tag$

Tag of a graph item

String property

Applies to: GraphItem

Introduced in KCML version 6.90


>Tag

Tag

This property is a free text field which can be referenced and modified by the program without effecting the appearance of the control. It is commonly used to associate labels to controls that don't have a Text$ property. Control labels set with Tag$ can be used by group event handlers to determine which control triggered the event. See Group events for more information about group event handlers.

The listbox Add() method can be used to associate a tag with a item at the time the item was being added to the list or tree.

The Tag$ property is often used with object references to tree, grid and listbox item as in

 count = 0
 OBJECT c = .listControl1.First
 WHILE OBJECT c <> NULL DO
        IF (c.tag$ == "X")
                count++
        END IF
    OBJECT c = c.Next
 WEND

See also

Generic methods, properties and events. GraphItem methods, properties and events. Grid methods, properties and events. GridCell methods, properties and events. ListItem methods, properties and events. MenuItem methods, properties and events. TabbedItem methods, properties and events. TreeItem methods, properties and events.