Treeview Images

r-S

Newcomer
Joined
Dec 10, 2004
Messages
7
Location
England
Treeview Positions

Hi :)

I have a treeview which contains a list of Tasks in order of priority.. There are 2 different images, each node uses one of them.. I'd like the nodes with ImageIndex 1 to be at the top and the nodes with imageindex 0 to be at the bottom...

If anyone can provide a link to a page with information about TreeViews so I could learn this, that'd be great - I've had no success with this so far. Thanksyou :D
 
Last edited:
You could sort the TreeNodes in a Collection before you add them to the TreeView. You'd also need to create your own methods that would search for the proper place in the TreeView to insert new TreeNodes.

The .NET Class Library reference for System.Windows.Forms.TreeView should provide everything you need.


r-S said:
Hi :)

I have a treeview which contains a list of Tasks in order of priority.. There are 2 different images, each node uses one of them.. I'd like the nodes with ImageIndex 1 to be at the top and the nodes with imageindex 0 to be at the bottom...

If anyone can provide a link to a page with information about TreeViews so I could learn this, that'd be great - I've had no success with this so far. Thanksyou :D
 
RobEmDee said:
You could sort the TreeNodes in a Collection before you add them to the TreeView. You'd also need to create your own methods that would search for the proper place in the TreeView to insert new TreeNodes.

The .NET Class Library reference for System.Windows.Forms.TreeView should provide everything you need.
Thankyou for the link! I'm at college right now, so I'll take a look at it in a few hours when I get home :)
 
Back
Top