Can anyone help me with this? Run this proyect, click the Open button and move the second form so that the label is placed above the first's form's treeview. Double-Click on the label.... Why does the event on the TreeView is triggered?
Printable View
Can anyone help me with this? Run this proyect, click the Open button and move the second form so that the label is placed above the first's form's treeview. Double-Click on the label.... Why does the event on the TreeView is triggered?
Hola Compatriota!
Its triggered cause its receiving the second click of the label double click,
and it computes it as click.
You could correct this simply adding a Public Boolean variable to Form1
and..VB Code:
Public mProcessClick As Boolean
Form2:VB Code:
Private Sub Form_Load() mProcessClick = True '... End sub Private Sub TV1_NodeClick(ByVal Node As MSComctlLib.Node) If mProcessClick Then DebugPrint TV1.SelectedItem.Key & " - NodeClick" End If End Sub
VB Code:
Private Sub Label1_DblClick() Form1.mProcessClick = False Unload Me End Sub
It's not a solution. I need the event not to be trigger at all. This is because even I can override the event, the selected item might have been changed... and this is not a desired behaviour.