Click here to Skip to main content
Click here to Skip to main content

Multi-select Treeview control v2.0

, 15 Aug 2004
Rate this:
Please Sign up or sign in to vote.
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

Share

About the Author

Mikael Wiberg
Web Developer
Sweden Sweden
No Biography provided

Comments and Discussions

 
QuestionHow to access checked items? PinmemberAlexander Pikus3-Nov-08 19:09 
Can anybody help me and tell how to access checked items? What code will access each checked item and item in the loop?
 
Thanks
 
Alexander
GeneralDraga and Drop Behavior PinmemberLarry Dodd5-Mar-08 10:45 
GeneralRe: Draga and Drop Behavior Pinmembervinutha kempanna5-Mar-08 10:57 
GeneralRe: Draga and Drop Behavior PinmemberMikael Wiberg5-Mar-08 19:03 
QuestionGreat code, license question? Pinmemberthatrickguy29-Nov-07 5:53 
AnswerRe: Great code, license question? PinmemberMikael Wiberg29-Nov-07 6:42 
GeneralOdd behaviour on deselect [modified] Pinmemberbenjymous19-Sep-07 22:09 
GeneralNodes.Clear Doesn't Clear SelNodes PinmemberChristopher Theunissen20-Apr-07 1:16 
GeneralRe: Nodes.Clear Doesn't Clear SelNodes PinmemberMikael Wiberg20-Apr-07 6:07 
QuestionSearch as you type doesn't work on the SameLevelMultiBranch Pinmembersofter2-Apr-07 0:58 
AnswerRe: Search as you type doesn't work on the SameLevelMultiBranch [modified] PinmemberMikael Wiberg9-Apr-07 0:27 
QuestionCheckboxes Pinmembersofter22-Dec-06 12:59 
AnswerRe: Checkboxes Pinmembersofter22-Dec-06 14:17 
GeneralRe: Checkboxes Pinmembersofter22-Dec-06 14:53 
GeneralRe: Checkboxes PinmemberMikael Wiberg22-Dec-06 17:46 
GeneralComercial Version PinmemberFooDogCom16-Dec-06 13:44 
GeneralRe: Comercial Version PinmemberMikael Wiberg16-Dec-06 20:06 
GeneralProblem with the highlighting/unhighlighting Pinmemberjebrew20-Sep-06 6:08 
GeneralLatest Version with DataBinding PinmemberJacob Shepherd29-Nov-05 12:46 
GeneralDeep Logic bug about selecting node(s) PinmemberLe_MuLoT13-Sep-05 4:17 
AnswerRe: Deep Logic bug about selecting node(s) PinmemberMikael Wiberg14-Sep-05 2:04 
GeneralRe: Deep Logic bug about selecting node(s) PinmemberLe_MuLoT14-Sep-05 3:13 
GeneralRe: Deep Logic bug about selecting node(s) PinmemberMikael Wiberg14-Sep-05 3:51 
GeneralRe: Deep Logic bug about selecting node(s) PinmemberLe_MuLoT14-Sep-05 7:12 
GeneralRe: Deep Logic bug about selecting node(s) PinmemberMikael Wiberg14-Sep-05 10:13 
GeneralProjectfiles for VS 2002 Pinmemberd00_ape7-May-05 9:55 
GeneralRe: Projectfiles for VS 2002 PinmemberMikael Wiberg7-May-05 21:44 
GeneralBuggy ForeColor PinmemberMarco Tenuti4-May-05 3:02 
GeneralRe: Buggy ForeColor PinmemberMikael Wiberg4-May-05 4:10 
GeneralAsk help about two treeviews Operation! Pinmemberdavidsoftware8-Jan-05 16:41 
GeneralRe: Ask help about two treeviews Operation! PinmemberMikael Wiberg9-Jan-05 8:03 
GeneralRe: Ask help about two treeviews Operation! Pinmemberdavidsoftware10-Jan-05 20:39 
GeneralRe: Ask help about two treeviews Operation! PinmemberLe_MuLoT8-Sep-05 11:24 
AnswerRe: Ask help about two treeviews Operation! PinmemberLe_MuLoT9-Sep-05 10:29 
GeneralRe: Ask help about two treeviews Operation! PinmemberMikael Wiberg10-Sep-05 2:55 
AnswerRe: Ask help about two treeviews Operation! PinmemberLe_MuLoT11-Sep-05 6:07 
GeneralRe: Ask help about two treeviews Operation! PinmemberMikael Wiberg11-Sep-05 7:08 
GeneralRe: Ask help about two treeviews Operation! PinmemberLe_MuLoT11-Sep-05 10:11 
GeneralRe: Ask help about two treeviews Operation! PinmemberMikael Wiberg11-Sep-05 10:45 
GeneralRe: Ask help about two treeviews Operation! PinmemberLe_MuLoT11-Sep-05 12:56 
GeneralRe: Ask help about two treeviews Operation! PinmemberMikael Wiberg11-Sep-05 17:52 
GeneralRe: Ask help about two treeviews Operation! PinmemberLe_MuLoT12-Sep-05 6:21 
GeneralAfterSelect not giving TreeViewAction PinmemberRacoonzz18-Oct-04 13:10 
GeneralRe: AfterSelect not giving TreeViewAction PinmemberMikael Wiberg19-Oct-04 1:31 
GeneralTech demo - NOT article PinmemberMikael Wiberg16-Aug-04 22:39 
GeneralRe: Tech demo - NOT article Pinmemberlabreuer20-Aug-04 11:16 
GeneralRe: Tech demo - NOT article PinmemberMikael Wiberg21-Aug-04 9:45 
GeneralRe: Tech demo - NOT article Pinmemberlabreuer22-Aug-04 8:53 
GeneralRe: Tech demo - NOT article PinmemberMikael Wiberg22-Aug-04 9:43 
GeneralRe: Tech demo - NOT article PinmemberLe_MuLoT9-Sep-05 10:46 

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.

| Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 16 Aug 2004
Article Copyright 2004 by Mikael Wiberg
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid