Solved

Image changing when select node in TreeView

Posted on 2001-07-01
7
368 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
ID: 6242101
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
ID: 6242109
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
ID: 6242115
if you don't want a change



                     node := TreeView1.Items.Add(nil{or whatever}, 'test');
                     node.ImageIndex := 1;
                     node.SelectedIndex := node.ImageIndex;
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 27

Expert Comment

by:kretzschmar
ID: 6242242
easy points eps :-)

guessing i can't avoid that you catch me soon

meikl ;-)
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6242308
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
ID: 6242325
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
ID: 6242857
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sending Gmail through Delphi 3 91
Process Javascript errors with Delphi TWebBrowser 1 113
LAN or WAN ? 11 82
SUM 2 INTEGER ARRAYS INTO 1 10 93
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

895 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

15 Experts available now in Live!

Get 1:1 Help Now