A
Anon
Hi,
I want the double click event to call(here not able to get the
MouseEventArgs) and execute the mouseup event code or any one tell me
how to make my treecontrol double click nodes to behave like a singe
click event(that is mouseup here)so that that will fire mouseup.How can
i implement this?any ideas ? code snippets?
Thanks in advance
satish
Here is the code.Consider these event handing code are inside a
usercontrol class.The tree control used here is infragistics tree
control.
Public Class ucNavigationTree
Inherits System.Windows.Forms.UserControl
Private Sub TreeView1_MouseUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles TreeView1.MouseUp
Dim pt As New Point(e.X, e.Y)
Dim clickedCtrl As TreeNode = TreeView1.GetNodeAt(pt)
If clickedCtrl Is Nothing OrElse clickedCtrl.Tag Is Nothing
Then Exit Sub
TreeView1.SelectedNode = TreeView1.GetNodeAt(New Point(e.X,
e.Y))
Try
If e.Button = MouseButtons.Left Then
Cursor.Current = Cursors.AppStarting
ActivateViewer(TreeView1.SelectedNode, False)
ElseIf e.Button = MouseButtons.Right Then
Dim mnu As ContextMenu
' display popup from attached tag
If TypeOf clickedCtrl.Tag Is
UserManagementDataSet.entitiesRow Then
mnu = MenuOpenOption
If Not mnu Is Nothing Then mnu.Show(TreeView1,
pt)
End If
End If
Finally
Cursor.Current = Cursors.Default
End Try
Debug.WriteLine("The Count is :" + counter.ToString)
End Sub
Private Sub TreeView1_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TreeView1.DoubleClick
End Sub
End Class
I want the double click event to call(here not able to get the
MouseEventArgs) and execute the mouseup event code or any one tell me
how to make my treecontrol double click nodes to behave like a singe
click event(that is mouseup here)so that that will fire mouseup.How can
i implement this?any ideas ? code snippets?
Thanks in advance
satish
Here is the code.Consider these event handing code are inside a
usercontrol class.The tree control used here is infragistics tree
control.
Public Class ucNavigationTree
Inherits System.Windows.Forms.UserControl
Private Sub TreeView1_MouseUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles TreeView1.MouseUp
Dim pt As New Point(e.X, e.Y)
Dim clickedCtrl As TreeNode = TreeView1.GetNodeAt(pt)
If clickedCtrl Is Nothing OrElse clickedCtrl.Tag Is Nothing
Then Exit Sub
TreeView1.SelectedNode = TreeView1.GetNodeAt(New Point(e.X,
e.Y))
Try
If e.Button = MouseButtons.Left Then
Cursor.Current = Cursors.AppStarting
ActivateViewer(TreeView1.SelectedNode, False)
ElseIf e.Button = MouseButtons.Right Then
Dim mnu As ContextMenu
' display popup from attached tag
If TypeOf clickedCtrl.Tag Is
UserManagementDataSet.entitiesRow Then
mnu = MenuOpenOption
If Not mnu Is Nothing Then mnu.Show(TreeView1,
pt)
End If
End If
Finally
Cursor.Current = Cursors.Default
End Try
Debug.WriteLine("The Count is :" + counter.ToString)
End Sub
Private Sub TreeView1_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TreeView1.DoubleClick
End Sub
End Class