dikonsult
asked on
Image changing when select node in TreeView
I have a imagelist to my treeview and set imageindex to each node when building the tree.
When selecting a node the image is changed to the image corresponding to imageindex 0 and changes back to the correct image when selecting other node.
I have checked all my events and they do not affect the imageindex in any way.
Tryed use the OnGetImageIndex and OnGetSelectedIndex to change imageindex to the right one but then recive a runtime error.
When selecting a node the image is changed to the image corresponding to imageindex 0 and changes back to the correct image when selecting other node.
I have checked all my events and they do not affect the imageindex in any way.
Tryed use the OnGetImageIndex and OnGetSelectedIndex to change imageindex to the right one but then recive a runtime error.
Set for each node in the treeview the ImageIndex and the SelectedIndex. Both must reference an image in the imagelist.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you don't want a change
node := TreeView1.Items.Add(nil{or whatever}, 'test');
node.ImageIndex := 1;
node.SelectedIndex := node.ImageIndex;
node := TreeView1.Items.Add(nil{or
node.ImageIndex := 1;
node.SelectedIndex := node.ImageIndex;
easy points eps :-)
guessing i can't avoid that you catch me soon
meikl ;-)
guessing i can't avoid that you catch me soon
meikl ;-)
I don't like difficult question on an early Sunday afternoon :o)
I should have caught you already :o(
I should have caught you already :o(
well, maybe you did it already :-)
(the point updates in ex-ex takes a bit time)
and you did it really at the top 100 :-(
;-)
(the point updates in ex-ex takes a bit time)
and you did it really at the top 100 :-(
;-)
ASKER
hey, if you have a argument please have that somewhere else. I know it was a simple question but 200p really got me an fast answer, didn't it?