在TCustomGrid.DrawCell过程里设定行高RowHeight。
用TCanvas.TextExtent方法测试单元格的大小。
TCanvas.TextRect中:
AlignmentFlags = (
AlignmentFlags_AlignLeft = 1 { $1 },
AlignmentFlags_AlignRight = 2 { $2 },
AlignmentFlags_AlignHCenter = 4 { $4 },
AlignmentFlags_AlignTop = 8 { $8 },
AlignmentFlags_AlignBottom = 16 { $10 },
AlignmentFlags_AlignVCenter = 32 { $20 },
AlignmentFlags_AlignCenter = 36 { $24 },
AlignmentFlags_SingleLine = 64 { $40 },
AlignmentFlags_DontClip = 128 { $80 },
AlignmentFlags_ExpandTabs = 256 { $100 },
AlignmentFlags_ShowPrefix = 512 { $200 },
AlignmentFlags_WordBreak = 1024 { $400 },
AlignmentFlags_DontPrint = 4096 { $1000 });