RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDBGrid.CalcTitleRect Method

Calculates the rectangular region that covers the cell indicated by the column and row parameters.

Pascal
function CalcTitleRect(Col: TColumn; ARow: Integer; var MasterCol: TColumn): TRect;
C++
__fastcall TRect CalcTitleRect(TColumn Col, int ARow, TColumn MasterCol);

In ADT datasets with ObjectView set to true, the rectangle covering a cell may be larger than the cell itself, covering several cells. The MasterCol parameter returns the DBGrid column object that determines the drawing behaviors of the calculated rectangle. For example, if the column parameter is an ADT child field, MasterCol will point to the column containing the ADT child field's parent field, or grandparent, depending on the Row param. Row 0 would return the outermost parent of the ADT child, and would return a rectangle that spans all of the ADT children of that parent. If the current column is not an ADT child, MasterCol returns nil (Delphi) or NULL (C++). 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!