Document Solutions for Imaging
GrapeCity.Documents.Imaging Assembly / GrapeCity.Documents.Text Namespace / TextLayout Class / Truncate Method
The text granularity used when trimming the last line of text.

In This Topic
    Truncate Method
    In This Topic
    If a portion of the text content does not fit into the current layout bounds, removes that portion so that the remaining text fits.

    If the text is truncated and lastLineTrimming is not TrimmingGranularity.None, ellipsis (specified by EllipsisCharCode) is appended to the last line to indicate that it was trimmed.

    Syntax
    'Declaration
     
    Public Function Truncate( _
       Optional ByVal lastLineTrimming As TrimmingGranularity _
    ) As System.Boolean
    public System.bool Truncate( 
       TrimmingGranularity lastLineTrimming
    )

    Parameters

    lastLineTrimming
    The text granularity used when trimming the last line of text.

    Return Value

    true if at least some text remains that fits into the current layout bounds, false if the current layout did not contain any text or all text had to be removed.
    Remarks
    Note that if there is only one line, and it does not fit into the available height, it is not removed, and this method returns true.
    See Also