5
어떻게 이미지를 TDBGrid
열 머리글에 넣을 수 있습니까?delphi : Image를 DBGrid Title에 넣을 수 있습니까?
나는 시도했지만 이미지 위에 계속 마우스를 올려 놓으면 이미지가 사라지지 않고 계속 표시됩니다.
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;
감사합니다. – ABDNET
@bummi 왜'FImagelist.Draw'가 더 깜박 거릴까요? – EProgrammerNotFound