NICKYSUWANDI
Programmer
hi guys,
i had write code to create toolbar with contextmenu inside the toolbar (using coding, toolbar and name reference from my treenode),like this :
-------------------
Dim Tnode As TreeNode, intno As Int16 = 0
For Each Tnode In e.Node.Nodes
TBar1.Buttons.Add(Tnode.Text)
TBar1.Buttons(intno).ToolTipText = Tnode.Text
Dim ncntnd As Integer = Tnode.GetNodeCount(True)
Dim Tnode1 As TreeNode
If ncntnd > 0 Then
'TBar1.DropDownArrows = False
TBar1.Buttons(intno).Style = ToolBarButtonStyle.DropDownButton
Dim cm As New ContextMenu
For Each Tnode1 In Tnode.Nodes
cm.MenuItems.Add(Tnode1.Text)
Next
TBar1.Buttons(intno).DropDownMenu = cm
End If
intno += 1
Next
---------
my problem is how i want know which menu has been clicked in context menu, please help and how to block the code in this web.
Thanks
Nicky
i had write code to create toolbar with contextmenu inside the toolbar (using coding, toolbar and name reference from my treenode),like this :
-------------------
Dim Tnode As TreeNode, intno As Int16 = 0
For Each Tnode In e.Node.Nodes
TBar1.Buttons.Add(Tnode.Text)
TBar1.Buttons(intno).ToolTipText = Tnode.Text
Dim ncntnd As Integer = Tnode.GetNodeCount(True)
Dim Tnode1 As TreeNode
If ncntnd > 0 Then
'TBar1.DropDownArrows = False
TBar1.Buttons(intno).Style = ToolBarButtonStyle.DropDownButton
Dim cm As New ContextMenu
For Each Tnode1 In Tnode.Nodes
cm.MenuItems.Add(Tnode1.Text)
Next
TBar1.Buttons(intno).DropDownMenu = cm
End If
intno += 1
Next
---------
my problem is how i want know which menu has been clicked in context menu, please help and how to block the code in this web.
Thanks
Nicky