TreeNode images problem

  • Thread starter Abdessamad Belangour
  • Start date
A

Abdessamad Belangour

Hi all,

I have a Windows Form class containing a treeView control.

I have another class HierarchyDocument that creates a hierarchy of treeNodes
and has a method (createHierarchy) that returns a TreeNode object.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -

HierarchyDocument HD=new HierarchyDocument(....);

tr=HD.createHierarchy();

treeView1.Nodes.Add (tr)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -

The problem is : How am i going to display the images of my treeNodes giving
that my HierarchyDocument class treeNodes are not yet affected to the
treeView control of my form1 class ? (the tr.ImageIndex gives nothing)

Thanks !
 
A

Abdessamad Belangour

Hi,
I found it. I have forgotten to assign the imageList object to the treeView
imageList property :).
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top