ComponentOne SuperTooltip for WinForms
C1.Win.8 Assembly / C1.Win.Drawing Namespace / StringRendererGDIPlus Class / HighlightSubstring Method / HighlightSubstring(Graphics,Font,StringFormat,Brush,Rectangle,String,Brush,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.Brush 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.Brush of substrings.
The substring to highlight.
The position at which the substring starts.

In This Topic
    HighlightSubstring(Graphics,Font,StringFormat,Brush,Rectangle,String,Brush,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 System.Drawing.Graphics, _
       ByVal font As System.Drawing.Font, _
       ByVal stringFormat As System.Drawing.StringFormat, _
       ByVal foreBrush As System.Drawing.Brush, _
       ByVal bounds As System.Drawing.Rectangle, _
       ByVal text As System.String, _
       ByVal highlightBrush As System.Drawing.Brush, _
       ByVal substring As System.String, _
       ByVal substringStartIndex As System.Integer _
    ) 
    public static void HighlightSubstring( 
       System.Drawing.Graphics graphics,
       System.Drawing.Font font,
       System.Drawing.StringFormat stringFormat,
       System.Drawing.Brush foreBrush,
       System.Drawing.Rectangle bounds,
       System.string text,
       System.Drawing.Brush highlightBrush,
       System.string substring,
       System.int substringStartIndex
    )

    Parameters

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