Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Icons for TTreeView

Status
Not open for further replies.

TimSNL

Programmer
Sep 11, 2001
119
AU
Hi,

I have some code working which puts filenames into a TTreeView component. How do I get the correct icons to display against each file in the treeview?

Thankyou for your help :)

Tim Dover
SNL Computing
 
Dear Tim, use an ImageList and fill it with the ImagesList editor.

Set the images property of your treeview to your ImageList

Open the Items Editor of your tree view

Set the Image Index of your item to the number the image in your ImageList

The selected Index will be shown when the item is selected

Remarks S. van Els
SAvanEls@cq-link.sr
 
Thanks for your reply, but this was not quite what i meant :)

How can I get windows to tell me which icon to use for which file at runtime? This is the question I meant to ask.

So, how can I find the icon associated with a file in windows (or the default icon is no association exists)?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top