Board index » delphi » Overlay Index in TTreeView and TListView

Overlay Index in TTreeView and TListView

I seem to be having a problem with the Overlay index property of
TTreeView and TListView I only seem to be able to Overlay about 4
images.
Is this a Delphi Limitation or my misunderstanding of how Overlay Index
Works.
Some example Code or application would be most usefull.

  dlouis.vcf
< 1K Download
 

Re:Overlay Index in TTreeView and TListView


Quote
Dominique Louis wrote...
>I seem to be having a problem with the Overlay index property of
>TTreeView and TListView I only seem to be able to Overlay about
>4 images.
>Is this a Delphi Limitation or my misunderstanding of how
>Overlay Index Works.

It is a limitation of Windows' comctl32.dll implementation of image lists.
An image list can have up to four overlay masks in version 4.70 and earlier
and up to 15 in version 4.71. Unfortunately, even Delphi 4 doesn't recognise
the new limit of 15 - the TOverlay type is declared 0..3.

You can get around this problem and use the full 15 image overlays. For
example:

  ImageList1.Overlay( 2, TOverlay(13) );
  ListView1.Items[0].OverlayIndex := TOverlay(13);

--
Tim Knipe | Plasmatech Software Design | http://plasmatech.com
Windows Explorer controls for ActiveX, Delphi and C++Builder!

Other Threads