treectrl.item Property


strText = treectrl.item(item, parent);
treectrl.item(item, parent) = strText;

Sets/retrieves the text of the specified item.

Parameters

item
Required. Either an integer specifying the item handle (in which case the parent is ignored) or a string specifying the item text. The string may contain a regular expression.
parent
Optional. Integer specifying the parent under which to search for the item. Default value is 0, meaning that items specified by text are searched in the whole tree control.

Example

// Test get/set item
    var hItem = treectrl.newItem("New item");
    treectrl.item(hItem) = "changed text";
    if (treectrl.item(hItem) != "changed text")
        Env.LogError("Could not change tree item text");
		

See also

treectrl Overview | treectrl.itemData

 


© 2003 Lightweight Technologies. All rights reserved.