Hello all, see if someone can help me:
In a TImageFolderMView I want to show a different background color for each thumbnail depending on a condition that I pick up a query to a BDD.
1: OnImageDraw:
Trying I see this event is called several times and consultation BDD is repeated unnecessarily. Any idea to make this more optimized?
2nd: Strange problem when I try to set the background color thumbnail:
// Example:
onImageDraw(Sender: TObject; idx: Integer; Left, Top: Integer; Canvas: TCanvas)
{
if (idx == 1)
{
Canvas->Rectangle(x,x,x,x);
ImageenView->ThumbnailsBackground = clRed;
}
}
At first, Canvas draw well a rectangle line when idx = 1, but ThumbnailsBackground set a background for the next thumbnail.
When idx = 1, ThumbnailBackground affect the idx+1, its extrange.
I just want to establish a different background color for thumbnails looking for that color in a database. I'm on the right track? Any suggestions?
Thanks alot.
Jorge.