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 As Graphics, _
ByVal As Font, _
ByVal As StringFormat, _
ByVal As Brush, _
ByVal As Rectangle, _
ByVal As String, _
ByVal As Brush, _
ByVal As String, _
ByVal As Integer _
)
public static void HighlightSubstring(
Graphics ,
Font ,
StringFormat ,
Brush ,
Rectangle ,
string ,
Brush ,
string ,
int
)
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