Skip to content

OnItemDblClick - AbstractTreeView

Fired whenever a user double-clicks an item

Type: Event

Parameters

Parameter Type Description
hItem Handle Item handle
ByRef bCancel Boolean Can be used to cancel the event by returning True

Syntax

Procedure OnItemDblClick Handle hItem ByRef Boolean bCancel

Description

The OnItemDblClick event is fired whenever a user double-clicks an item. The item becomes the current item just prior to this event being received.

Sample

Procedure OnItemDblClick Handle hItem Boolean ByRef bCancel
    // do something when user double-clicks the item
End_Procedure

Sample

This sample demonstrates the use of the bCancel parameter to cancel the clicked item becoming the current item.

Procedure OnItemDblClick Handle hItem Boolean ByRef bCancel
    Move True to bCancel
End_Procedure

Sample

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

Procedure OnItemDblClick 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