Solved

Image changing when select node in TreeView

Posted on 2001-07-01
7
366 Views
Last Modified: 2010-04-06
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.
0
Comment
Question by:dikonsult
  • 3
  • 3
7 Comments
 
LVL 13

Expert Comment

by:Epsylon
Comment Utility
Set for each node in the treeview the ImageIndex and the SelectedIndex. Both must reference an image in the imagelist.
0
 
LVL 13

Accepted Solution

by:
Epsylon earned 200 total points
Comment Utility
It must be something like this:

node := TreeView1.Items.Add(nil{or whatever}, 'test');
node.ImageIndex := 1;
node.SelectedIndex := 0;
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
if you don't want a change



                     node := TreeView1.Items.Add(nil{or whatever}, 'test');
                     node.ImageIndex := 1;
                     node.SelectedIndex := node.ImageIndex;
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
easy points eps :-)

guessing i can't avoid that you catch me soon

meikl ;-)
0
 
LVL 13

Expert Comment

by:Epsylon
Comment Utility
I don't like difficult question on an early Sunday afternoon  :o)

I should have caught you already   :o(
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
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 :-(

;-)
0
 

Author Comment

by:dikonsult
Comment Utility
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?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now