InputPanel for WinForms | ComponentOne
C1.Win.8 Assembly / C1.Win.Drawing Namespace / StringRendererGDI Class / HighlightSubstring Method / HighlightSubstring(Graphics,Font,TextFormatFlags,Color,Rectangle,String,Color,String,Int32) Method
The device context in which to draw the text.
The System.Drawing.Font to apply to the drawn text.
The text layout information.
The System.Drawing.Color to apply to the drawn text.
The System.Drawing.Rectangle that represents the bounds of the text.
The text to draw.
The highlight System.Drawing.Color of substrings.
The substring to highlight.
The position at which the substring starts.

In This Topic
    HighlightSubstring(Graphics,Font,TextFormatFlags,Color,Rectangle,String,Color,String,Int32) Method
    In This Topic
    Draws text and highlight a part of that text with a special background.
    Syntax
    'Declaration
     
    Public Overloads Shared Sub HighlightSubstring( _
       ByVal graphics As Graphics, _
       ByVal font As Font, _
       ByVal textFormatFlags As TextFormatFlags, _
       ByVal foreColor As Color, _
       ByVal bounds As Rectangle, _
       ByVal text As String, _
       ByVal highlightColor As Color, _
       ByVal substring As String, _
       ByVal substringStartIndex As Integer _
    ) 
    public static void HighlightSubstring( 
       Graphics graphics,
       Font font,
       TextFormatFlags textFormatFlags,
       Color foreColor,
       Rectangle bounds,
       string text,
       Color highlightColor,
       string substring,
       int substringStartIndex
    )

    Parameters

    graphics
    The device context in which to draw the text.
    font
    The System.Drawing.Font to apply to the drawn text.
    textFormatFlags
    The text layout information.
    foreColor
    The System.Drawing.Color to apply to the drawn text.
    bounds
    The System.Drawing.Rectangle that represents the bounds of the text.
    text
    The text to draw.
    highlightColor
    The highlight System.Drawing.Color of substrings.
    substring
    The substring to highlight.
    substringStartIndex
    The position at which the substring starts.
    See Also