Skip to content

ItemLabel - AbstractTreeView

Sets tree item label that is displayed alongside the image

Type: Property
Access: Read/Write
Data Type: String
Parameters: None

Parameters

Parameter Type Description
hItem Handle The item handle

Syntax

Property String ItemLabel
Access Type Syntax
Read Access: Get ItemLabel to StringVariable
Write Access: Set ItemLabel to StringVariable/Value

Description

Each item in a treeview control has a label that is displayed alongside the image. You can set the label with either the Set ItemLabel or Get AddTreeItem (sValue parameter) methods.

Sample

This sample shows how to retrieve the ItemLabel of a tree item when the user clicks that tree item and use it to execute an action.

Procedure OnItemClick Handle hItem Boolean ByRef bCancel
    String sValue

    Get ItemLabel hItem to sValue
    If (sValue contains "Account") Begin
        Send ProcessAccount
    End
    Else If (sValue contains "Customer") Begin
        Send ProcessCustomer
    End
End_Procedure