Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
415
Node images aren't appearing
posted

Display a menu tree of an applications menu:

 Parent node images are set like:

node.Override.ExpandedNodeAppearance.Image = Properties.Resources.smallClosedFolder;
node.Override.NodeAppearance.Image = Properties.Resources.smallClosedFolder;

Leaf nodes are set like:

node.LeftImages.Add(Properties.Resources.User2);

 Neither of the images show up in the tree, but strangely enough it looks like space has been alloted for them in the control.

Any ideas? 

  • 69832
    Offline posted

    Most likely you are assigning a System.Drawing.Icon to the Image property, which is not supported. Convert the icon to a bitmap (see Icon.ToBitmap method) and don't forget to dispose of any bitmaps you create.