Hi
Another way to do the preceding would be to make use of the ImageTag or ImageUserPointer properties.
http://www.imageen.com/help/TImageEnMView.ImageTag.html
http://www.imageen.com/help/TImageEnMView.ImageUserPointer.html
To point to an entry in TList, Database, etc.
If you only need to store one color then simply use ImageTag as a color:
Appending:
idx := AppendImage( SomeFile );
If ShouldHighlightThumb( SomeFile ) then
ImageEnMView1.ImageTag[ idx ] := Integer( clYellow )
else
ImageEnMView1.ImageTag[ idx ] := Integer( clWindowText );
Setting color:
procedure TForm1.IEFolderMViewGetTextEx(Sender: TObject; Index: Integer; Position: TIEMTextPos; var Text: WideString;
Font : TFont; var BackgroundStyle: TBrushStyle; var BackgroundColor: TColor;
var TruncSide: TIEMTruncSide);
begin
BackgroundColor := TColor( ImageEnMView1.ImageTag[ Index] );
end;
Nigel
Xequte Software
www.xequte.com
nigel@xequte.com