DrawExcelColumnNameAndCaption
(
DrawingObjects oDrawingObjects,
String sColumnName,
String sCaption,
Int32 iLeft,
Int32 iRight,
ref Int32 iTop
)
{
Debug.Assert(oDrawingObjects != null);
Debug.Assert( !String.IsNullOrEmpty(sColumnName) );
Debug.Assert( !String.IsNullOrEmpty(sCaption) );
oDrawingObjects.Graphics.DrawString(sCaption, oDrawingObjects.Font,
SystemBrushes.GrayText, iRight,
iTop + oDrawingObjects.GetFontHeightMultiple(0.2F),
oDrawingObjects.RightAlignStringFormat);
DrawExcelColumnName(oDrawingObjects, sColumnName, iLeft,
iRight - MeasureTextWidth(oDrawingObjects, sCaption), ref iTop);
}