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 As System.Drawing.Graphics, _
ByVal As System.Drawing.Font, _
ByVal As System.Windows.Forms.TextFormatFlags, _
ByVal As System.Drawing.Color, _
ByVal As System.Drawing.Rectangle, _
ByVal As System.String, _
ByVal As System.Drawing.Color, _
ByVal As System.String, _
ByVal As System.Integer _
)
public static void HighlightSubstring(
System.Drawing.Graphics ,
System.Drawing.Font ,
System.Windows.Forms.TextFormatFlags ,
System.Drawing.Color ,
System.Drawing.Rectangle ,
System.string ,
System.Drawing.Color ,
System.string ,
System.int
)
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