API:Vcl.DBGrids.TDBGrid.OnDrawColumnCell

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

property OnDrawColumnCell: TDrawColumnCellEvent read FOnDrawColumnCell write FOnDrawColumnCell;

C++

__property OnDrawColumnCell;

プロパティ

種類 可視性 ソース ユニット
event published
Vcl.DbGrids.pas
Vcl.DBGrids.hpp
Vcl.DBGrids TDBGrid

説明

グリッドがセルを描画しなければならないときに発生します。

Vcl.DBGrids.TDBGrid.OnDrawColumnCell は Vcl.DBGrids.TCustomDBGrid.OnDrawColumnCell を継承しています。以下の内容はすべて Vcl.DBGrids.TCustomDBGrid.OnDrawColumnCell を参照しています。

グリッドがセルを描画しなければならないときに発生します。

セルデータにカスタマイズされた描画方法を提供するために OnDrawColumnCell イベントハンドラを作成します。Canvas プロパティのメソッドを使ってセルを描画します。

OnDrawColumnCell イベントハンドラは,DefaultDrawColumnCell メソッドを呼び出して,セルにデータを書き込むようにデータベース対応グリッドに指示することができます。また,OnDrawColumnCell イベントハンドラは,DefaultDrawColumnCell メソッドを強化して,選択状態とフォーカスを視覚的に示すことができます。

DefaultDrawing プロパティが true の場合,OnDrawColumnCell イベント発生前にデータはすでにセルに描画されており,また OnDrawColumnCell イベント発生後には選択されたセルに長方形のフォーカス領域が描画されます。

メモ:  Columns の State プロパティが csDefault の場合,OnDrawDataCell イベントの後に OnDrawColumnCell イベントが発生します。OnDrawDataCell は旧式のイベントで,下位互換性を保つために用意されています。OnDrawDataCell イベントハンドラと OnDrawColumnCell イベントハンドラの両方を設定してはなりません。

関連項目