Re: TListView images for Captions and Items - how to?


2004-02-28 07:58:20 PM
cppbuilder54
Quote
Look at the LVM_GETITEMSPACING message (or the ListView_GetItemSpacing()
macro) in the Win32 API.
I think the problem is elsewhere. How to tell VCL
that I do not want to use images from the SmallImages,
only from the StateImages?
The pictures below show two TListViews. One with
Captions and the other without.
In the first case, I use
l->Item[0]->ImageIndex=0;
and thus, the SmallImage appears together with
the StateImage:
arapi.w.interia.pl/bad_lv_2.gif
To turn off the SmallImage, I use
l->Item[0]->ImageIndex=-1;
and then I get
arapi.w.interia.pl/bad_lv_1.gif
So, the spacing is still there!
Is there a better method to remove SmallImage than
setting the ImageIndex to -1?
Yours,
Maciej