0

Delphi 7で定型化されたテーブルを使用するにはどうすればよいですか?例えば:

ここに画像の説明を入力してください

4

2 に答える 2

5

TDbGridコンポーネントをテーマにする場合は、JeremyNorthとAndreasHausladenThemed DBGrid runtime replacementのを使用できます。

于 2012-09-29T13:21:48.703 に答える
1

Delphi7とWindows8.1でこの例を作成し、テストしました

イベントDrawColumnCellを使用して、色などを変更します。

procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
  try
    if Column.FieldName = 'FIRST_NAME' then
      DBGrid1.Canvas.Brush.Color := clGreen;
  finally
    DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
  end;
end;

完全な例をダウンロード: ファイル

于 2016-11-25T18:53:08.460 に答える