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
504
UltratreeNode image not updated when property is modified
posted

Hello,

I am building a tree from a background worker, so that the user sees the tree build up "live". For nodes that are not completely filled, I want to temporarily change their default image for a "loading" image. When a node gets all its child nodes, its image is reset to default.

Here is my code :

 

// initialize node

node.Override.NodeAppearance.Image = index;

...

// now child nodes are to be added : change image to "loading"

node.Override.NodeAppearance.Image = (Image)Properties.Resources.ResourceManager.GetObject("loading"));

treeView.Refresh();

...

// tree loaded : reset initial image index

node.Override.NodeAppearance.Image = index;

 

However, this does not work : all nodes keep their initial image. Even with the tree refresh I cannot see my "loading" picture.

Thank you for your help !

Parents Reply Children