Bom dia, estou usando o seguinte metodo para colocar uma imagen dentro de um Buttom no DBGrid:
procedure TForm.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if Column.ButtonStyle = cbsButtonColumn then
begin
DMImages.ImageList16x16.Draw(DBGrid1.Canvas, Rect.Left+5,
Rect.Top+2, 28); //28 é index da imagem no imagelist
end;
end;
minha pergunta é, existe alguma outra forma melhor de fazer isso, ou esta é a forma correta de fazer?
Att.
Anderson Junior