5
Jak mogę umieścić obraz w nagłówku kolumny TDBGrid
?delphi: jak mogę umieścić obraz w tytule DBGrid?
Próbowałem, ale obraz pokazywał się i znikał, gdy umieściłem mysz nad tytułem.
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if Column.FieldName = order then
Begin
Column.Title.Font.Color := clBlue;
//if gdFixed in State then // didn't work.. I don't know why!!!
if Rect.Top < 30 then
ImageList1.Draw(DBGrid1.Canvas, Rect.Right-18, Rect.Top-18, 0);
end
else
Column.Title.Font.Color := clWindowText;
end;
doskonała. dziękuję bardzo – ABDNET
@bummi Dlaczego 'FImagelist.Draw' spowodowałoby więcej migotania? – EProgrammerNotFound