virtual int GetRowHeight(ROWCOL nRow);
nRow
Specifies the row id.
Returns the row-height in pixels. If it is 0, the column is hidden.
Overridable method which returns the row-height in pixels.
Note that this value is computed from an internally stored logical height that considers the font-size of the standard-style and the zooming-factor.
Height_LPtoDP helps you convert from logical to pixel values when you override this method. You should also consider calling IsRowHidden to ensure that you return 0 for hidden rows.
Note
The base-class version of this method will limit the cell size so it is not larger than the grid height. If you want cells can to be larger than the grid, you should set the attribute m_bLimitRowHeight = FALSE.
This example illustrates overriding GetRowHeight.
int TheDerivedGridClass::GetRowHeight(ROWCOL nRow)
{
if (IsRowHidden(nRow))
return 0;
else if (GetDocument->RowHeightArray[nRow] < 0)
return GetDefaultRowHeight( );
return Height_LPtoDP(GetDocument->RowHeightArray[nRow]);
}
CGXGridCore::SetRowHeight CGXGridCore::IsRowHidden CGXGridCore::Height_LPtoDP
Class Overview | Class Members