Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / FormattedTextList Class / FormatText Method
The Font that will be used to format the Text.
The 0 based index that determines the formatting's starting point.

The length of the formatted section of Text.

If this value is 0, everything that follows the startingIndex will be formatted.



In This Topic
    FormatText Method (FormattedTextList)
    In This Topic
    Formats a specific section of Text with a selected Font.
    Syntax
    'Declaration
     
    
    Public Function FormatText( _
       ByVal newTextFont As Font, _
       ByVal startingIndex As Integer, _
       Optional ByVal length As Integer _
    ) As FormattedTextList
    'Usage
     
    
    Dim instance As FormattedTextList
    Dim newTextFont As Font
    Dim startingIndex As Integer
    Dim length As Integer
    Dim value As FormattedTextList
     
    value = instance.FormatText(newTextFont, startingIndex, length)

    Parameters

    newTextFont
    The Font that will be used to format the Text.
    startingIndex
    The 0 based index that determines the formatting's starting point.
    length

    The length of the formatted section of Text.

    If this value is 0, everything that follows the startingIndex will be formatted.

    Remarks
    The selected part of the text will adopt the specified Font, while the rest of the text will stay the same.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also