Tree/ListView images - are they only from ImageLists?

  • Thread starter Thread starter Adam Hearn
  • Start date Start date
A

Adam Hearn

I've got a base image for an item and some common adornments. The adornments
reflect the state of the item being shown in the list. Stuff like padlock
for locked, cogs for in-use and the like. I've got the code that dynamically
generates an appropriate image based on the state.

The problem is how do I make the Tree/ListView item use it? These seem only
to have ImageIndex properties? I've already got 4 images lists offering
small and large sizes for 256 colour and XP images - seems rather onerous!

Any advice gratefully received!
 
Adam,

* "Adam Hearn said:
I've got a base image for an item and some common adornments. The adornments
reflect the state of the item being shown in the list. Stuff like padlock
for locked, cogs for in-use and the like. I've got the code that dynamically
generates an appropriate image based on the state.

The problem is how do I make the Tree/ListView item use it? These seem only
to have ImageIndex properties? I've already got 4 images lists offering
small and large sizes for 256 colour and XP images - seems rather onerous!

It seems that you will have to store all the images in one imagelist and
set the 'ImageIndex' according to the item's state.
 
Indeed that's the conclusion I had :( I realise that there's a resource
saving when using an ImageList object but it would have been good to
override an image for a particular entry!
 
Back
Top