Click here to Skip to main content
Licence 
First Posted 15 Aug 2004
Views 127,721
Downloads 1,660
Bookmarked 41 times

Multi-select Treeview control v2.0

By | 15 Aug 2004 | Article
Multi-select Treeview control v2.0

Screenshots

Introduction

This is a multi select TreeView Control for the .NET framework. It is possible to select TreeNodes in multiple ways with or without constraints.

Details

The MWTreeView has a few ways of mouse-selecting the TreeNodes by painting anything from a rubberband to very graphical representations. There is even the possibility, using GDI+, to customize the mouse-selection. It is also possible to have TreeNodes of various colors within the same MWTreeView with multi-selection still working. The MWTreeView has a massive amount of configurable settings so that anyone should be able to tailor it to their needs.

Note that when selecting TreeNodes in code the SelectNode (DeselectNode also exists) method should be used. Note that when changing the colors of a TreeNode the ChangeColors method should be used. Do not just change the colors of a TreeNode.

Note that in order to iterate through the selected TreeNodes the following method has to be used (selected TreeNodes are stored in a Hashtable):

foreach(MWTreeNodeWrapper mwtnw in mwtvMWTreeView.SelNodes.Values)
{
   MessageBox.Show("The " + mwtnw.Node.Text + 
    " TreeNode is selected.");
}

Contacting me

I can be reached through the forum here at CodeProject or through one of my addresses:

  • My mik address can be found on netatonce.net.
  • My mick address can be found on ar.com.au.
  • My mikwib address can be found on hotmail.com.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Mikael Wiberg

Web Developer

Sweden Sweden

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionHow to access checked items? PinmemberAlexander Pikus19:09 3 Nov '08  
GeneralDraga and Drop Behavior PinmemberLarry Dodd10:45 5 Mar '08  
GeneralRe: Draga and Drop Behavior Pinmembervinutha kempanna10:57 5 Mar '08  
GeneralRe: Draga and Drop Behavior PinmemberMikael Wiberg19:03 5 Mar '08  
QuestionGreat code, license question? Pinmemberthatrickguy5:53 29 Nov '07  
AnswerRe: Great code, license question? PinmemberMikael Wiberg6:42 29 Nov '07  
GeneralOdd behaviour on deselect [modified] Pinmemberbenjymous22:09 19 Sep '07  
GeneralNodes.Clear Doesn't Clear SelNodes PinmemberChristopher Theunissen1:16 20 Apr '07  
GeneralRe: Nodes.Clear Doesn't Clear SelNodes PinmemberMikael Wiberg6:07 20 Apr '07  
QuestionSearch as you type doesn't work on the SameLevelMultiBranch Pinmembersofter0:58 2 Apr '07  
AnswerRe: Search as you type doesn't work on the SameLevelMultiBranch [modified] PinmemberMikael Wiberg0:27 9 Apr '07  
QuestionCheckboxes Pinmembersofter12:59 22 Dec '06  
AnswerRe: Checkboxes Pinmembersofter14:17 22 Dec '06  
GeneralRe: Checkboxes Pinmembersofter14:53 22 Dec '06  
GeneralRe: Checkboxes PinmemberMikael Wiberg17:46 22 Dec '06  
GeneralComercial Version PinmemberFooDogCom13:44 16 Dec '06  
GeneralRe: Comercial Version PinmemberMikael Wiberg20:06 16 Dec '06  
GeneralProblem with the highlighting/unhighlighting Pinmemberjebrew6:08 20 Sep '06  
GeneralLatest Version with DataBinding PinmemberJacob Shepherd12:46 29 Nov '05  
GeneralDeep Logic bug about selecting node(s) PinmemberLe_MuLoT4:17 13 Sep '05  
AnswerRe: Deep Logic bug about selecting node(s) PinmemberMikael Wiberg2:04 14 Sep '05  
GeneralRe: Deep Logic bug about selecting node(s) PinmemberLe_MuLoT3:13 14 Sep '05  
GeneralRe: Deep Logic bug about selecting node(s) PinmemberMikael Wiberg3:51 14 Sep '05  
GeneralRe: Deep Logic bug about selecting node(s) PinmemberLe_MuLoT7:12 14 Sep '05  
GeneralRe: Deep Logic bug about selecting node(s) PinmemberMikael Wiberg10:13 14 Sep '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 16 Aug 2004
Article Copyright 2004 by Mikael Wiberg
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid