Hello
I fill and trying to add diference pictograms to cells before text.
It should be
But when i use AddPicture it looks
My pictures are stored in PictureContainer
while not Query.Eof do
begin
Grid.Ints[0, Query.recno + 1] := Query.FieldByName('ArtNr').asinteger;
if Query.FieldByName('checked').isnull then
Grid.AddPicture(0, Query.RecNo + 1, PictureContainer1.FindBitmap('HOURGLASS'), false, StretchWithAspectRatio, 8, haLeft, vaCenter)
// Grid.AddImageIdx(0, Query.RecNo + 1, 2, haLeft, vaCenter)
else
begin
if Query.FieldByName('checked').AsBoolean then
Grid.AddPicture(0, Query.RecNo + 1, PictureContainer1.FindBitmap('APPLY'), false, StretchWithAspectRatio, 8, haLeft, vaCenter)
// Grid.AddImageIdx(0, Query.RecNo + 1, 0, haLeft, vaCenter)
else if Query.FieldByName('checked').asboolean = false then
Grid.AddPicture(0, Query.RecNo + 1, PictureContainer1.FindBitmap('BUTTON_CANCEL'), false, StretchWithAspectRatio, 8, haLeft, vaCenter);
// Grid.AddImageIdx(0, Query.RecNo + 1, 1, haLeft, vaCenter);
end;
Query.Next;
end;
but the last image is always taken and overwritten in all cells.
I tryed it with Grid.AddImage but there I cant resize the picture.
What I doing wrong with AddPicture?
With best regards V. Klamm