PrintDocument for WinForms | ComponentOne
C1.Win.PrintPreview.4.5.2 Assembly / C1.Win.C1Preview.Design Namespace / SampleC1PrintDocument Class / RenderBlockText Method / RenderBlockText(String,Font,Color,AlignHorzEnum) Method
The text to render.
The System.Drawing.Font to use (can be null).
The text color to use.
The horizontal text alignment to use.

In This Topic
    RenderBlockText(String,Font,Color,AlignHorzEnum) Method
    In This Topic
    Renders a block of text into the block flow of the current document, using the specified font, text color and horizontal alignment.
    Syntax
    'Declaration
     
    Public Overloads Function RenderBlockText( _
       ByVal text As String, _
       ByVal font As Font, _
       ByVal textColor As Color, _
       ByVal horzAlign As AlignHorzEnum _
    ) As Boolean
    public bool RenderBlockText( 
       string text,
       Font font,
       Color textColor,
       AlignHorzEnum horzAlign
    )

    Parameters

    text
    The text to render.
    font
    The System.Drawing.Font to use (can be null).
    textColor
    The text color to use.
    horzAlign
    The horizontal text alignment to use.

    Return Value

    true if no warnings were generated by this call, false otherwise.
    Remarks

    See C1.C1Preview.C1PrintDocument.RenderBlockText for details on how the width and height of the text block are set.

    This method can only be used between calls to C1.C1Preview.C1PrintDocument.StartDoc and C1.C1Preview.C1PrintDocument.EndDoc methods on the current document. For details, see C1.C1Preview.C1PrintDocument.RenderBlock.

    See Also