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

説明

グリッドがセルを描画しなければならないときに発生します。 {{#multireplace:Vcl.DBGrids.TDBGrid.OnDrawColumnCell|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} は {{#multireplace:Vcl.DBGrids.TCustomDBGrid.OnDrawColumnCell|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} を継承しています。以下の内容はすべて {{#multireplace:Vcl.DBGrids.TCustomDBGrid.OnDrawColumnCell|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} を参照しています。

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

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

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

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

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

関連項目