property HostContext.Item as Long
Returns the handle of the item from the current cursor location.

TypeDescription
Long A Long expression that specifies the handle of the item from the current cursor location.
The Item property returns a valid value, while the HitTest property includes the exHTValidItem. The Item property returns the handle of the item from the current cursor location. For instance, the ItemBold property of the Items object bolds or un-bolds the item giving its handle. The Item value can be used on any property of the Items object that has a Item parameter.

The following sample toggles the item's bold attribute when the user right clicks the control:

Private Sub G2Host1_Context()
    With G2Host1
        If (.HostContext.HitTest And exHTValidItem) Then
            .Host.Items.ItemBold(.HostContext.Item) = Not .Host.Items.ItemBold(.HostContext.Item)
        End If
    End With
End Sub