B
Bob
Hi,
I have a treeview which contains nodes of a class (classA) derived from
treenode.
These classA nodes may contain nodes of a class (ClassB) derived from
classA.
The form load populates a imagelist and calls a subroutine that assigns an
image to each node depending on its type.
If I expand a classA node, all is well. ie. I see the classA image on the
classA node and the classB image on the exposed classB node (which is always
a leaf node)
If I then click on the classB node it takes a classA image.
If I move further down the tree trunk and repeat this procedure on another
classA node the fault moves to this node / leaf node pair
ie. The first node / leaf node pair revert to the correct images.
It seems to me that it is something to do with selecting the leaf node, but
I have commented out my mouse event handlers and it still happens.
Also single stepping indicates that it is not in user defined code because
as soon as you step out of the mouse down event handler the code runs on
automatically and paints the form with the faulty image.
It is picking up image(0) from the imagelist.
Is this a known bug?
Is there a workaround?
thanks
Bob
I have a treeview which contains nodes of a class (classA) derived from
treenode.
These classA nodes may contain nodes of a class (ClassB) derived from
classA.
The form load populates a imagelist and calls a subroutine that assigns an
image to each node depending on its type.
If I expand a classA node, all is well. ie. I see the classA image on the
classA node and the classB image on the exposed classB node (which is always
a leaf node)
If I then click on the classB node it takes a classA image.
If I move further down the tree trunk and repeat this procedure on another
classA node the fault moves to this node / leaf node pair
ie. The first node / leaf node pair revert to the correct images.
It seems to me that it is something to do with selecting the leaf node, but
I have commented out my mouse event handlers and it still happens.
Also single stepping indicates that it is not in user defined code because
as soon as you step out of the mouse down event handler the code runs on
automatically and paints the form with the faulty image.
It is picking up image(0) from the imagelist.
Is this a known bug?
Is there a workaround?
thanks
Bob