Smrf.NodeXL.ExcelTemplate.AutoFillResultsLegendControl.DrawExcelColumnNameAndCaption C# (CSharp) Method

DrawExcelColumnNameAndCaption() protected method

protected DrawExcelColumnNameAndCaption ( DrawingObjects oDrawingObjects, String sColumnName, String sCaption, Int32 iLeft, Int32 iRight, Int32 &iTop ) : void
oDrawingObjects DrawingObjects
sColumnName String
sCaption String
iLeft System.Int32
iRight System.Int32
iTop System.Int32
return void
    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);
    }