Results 1 to 3 of 3

Thread: MultiSelect Treeview

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2013
    Posts
    35

    Question MultiSelect Treeview

    How to select one or more nodes using the treeview?

    Att
    Joel Vieira

  2. #2
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    Re: MultiSelect Treeview

    With the standard .net treeview, you can't. I suspect it would not be very difficult to create the effect though....

    Create a class level List(of Treenode) to hold to selected nodes collection,
    If a node is clicked, check the control key using the Control.ModifierKeys property,
    If control is not pressed, clear the selected nodes
    If the control key is pressed, add the node to the selected nodes collection
    Finally, handle the treeviews drawNode event and if the node being drawn is in the collection, draw it so it looks selected using the SystemColors.Highlight Property.

    Also if you wanted to perform and action of the entire selection, (such as delete, copy, etc) you would perform the action to everything in the selected node collection.


    I have only highlighted a method that could work, and I'm sure there are a number of details I did not mention, but if you give it a go, I'm sure there are people to help if you get stuck
    kevin
    Last edited by kebo; Nov 5th, 2014 at 05:59 PM.
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  3. #3
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,390

    Re: MultiSelect Treeview

    I use objectlistview ... this has a treeview that supports columns and multi-select ... but it may be a little complex for a n00b... still worth the look though

    Kris

Tags for this Thread

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