|
-
Aug 2nd, 2004, 11:50 PM
#1
Thread Starter
Addicted Member
treeview using Contextmenu
Hi..
How to use the contextmenu to add and delete folders into the treeview during runtime.....
I am a bit blur...
can send me sample codes if any of you have solved it before for reference....
Thanks
-
Aug 3rd, 2004, 12:58 AM
#2
Thread Starter
Addicted Member
Hi
Currently i am doing the right click button for the treeview to add or remove folder, but i receive the error messages.... i try import these packages, also cannot worked....
Imports System
Imports System.Drawing
Imports System.Windows.Forms
The error are:
Value of type 'Integer' cannot be converted to 'System.Drawing.Point'. (for e.Y)
And
Too many arguments to 'Public Sub Show(control As System.Windows.Forms.Control, pos As System.Drawing.Point)'.
(for e.X)
Below is the code:
Code:
Private Sub trOwn_MouseDown(ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) _
Handles trOwn.MouseDown
'If the right button is down
If e.Button = MouseButtons.Right Then
'Find the item that was clicked on
contextMenuNode = trOwn.GetNodeAt(e.X, e.Y)
'If found, display the context menu
If Not IsNothing(contextMenuNode) Then
ContextMenu1.Show(trOwn, e.X, e.Y) ----- Error occur
End If
End If
End Sub
Anyway to resolved or improve....
Thanks
Last edited by toytoy; Dec 3rd, 2004 at 08:25 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|