Vcl.DBGrids.TCustomDBGrid.DrawCell
Delphi
procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); override;
C++
virtual void __fastcall DrawCell(int ACol, int ARow, const System::Types::TRect &ARect, Vcl::Grids::TGridDrawState AState);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
procedure function |
protected | Vcl.DbGrids.pas Vcl.DBGrids.hpp |
Vcl.DBGrids | TCustomDBGrid |
説明
ACol および ARow パラメータによって指定されるセルを描画します。
DrawCell メソッドは,グリッド内でセルを描画するとき Columns プロパティを使用できるように,継承メソッドをオーバーライドします。
DrawCell メソッドはフォントとブラシをセットアップし,セルの背景をペイントします。DefaultDrawing プロパティが true の場合,DrawCell は,データを取り出して ARect パラメータが指す位置に書き込みます。次に,DefaultDrawing が true,false いずれであっても,DrawCell は,OnDrawDataCell イベントと OnDrawColumnCell イベントを発生します。最後に,DefaultDrawing が true で,セルにフォーカスがあるかそのセルが選択されていて,なおかつ Options に dgAlwaysShowSelection が含まれている場合,DrawCell は,セルの周囲に長方形のフォーカス領域を描画します。