Results 1 to 3 of 3

Thread: how to create a context menu on a selected node in tree view

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2010
    Posts
    76

    how to create a context menu on a selected node in tree view

    Hi,

    Can anyone give me an example how to create a right click on selected node in tree view..example

    parentNode = mdiform
    childnode1 = child form1
    childnode2 = chile form2

    which ever i select a different node a corresponding form will appear with a mouseup event.

    i must choose first a node to view my contextmenu.

    Thank you very much.

  2. #2
    PowerPoster Radjesh Klauke's Avatar
    Join Date
    Dec 2005
    Location
    Sexbierum (Netherlands)
    Posts
    2,244

    Re: how to create a context menu on a selected node in tree view

    Something like:
    (mousedown event of the treeview)
    Code:
    select case selectednode.text
       case "child form 1"
          yourtreeview.contextmenu = yourcontextmenu
       case else
         yourtreeview.contextmenu = yourothercontextmenu
    end select
    Understand what I mean?


    If you found my post helpful, please rate it.

    Codebank Submission: FireFox Browser (Gecko) in VB.NET, Load files, (sub)folders treeview with Windows icons

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2010
    Posts
    76

    Re: how to create a context menu on a selected node in tree view

    Yes
    Thanks for the reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width