TextEditCustomHighlightTextEventArgs.HighlightRanges(String, Color, Color, CompareOptions) Method
Highlights all text blocks that have specified content using custom foreground and background colors.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.2.dll
Declaration
public void HighlightRanges(
string text,
Color foreColor,
Color backColor,
CompareOptions options = CompareOptions.IgnoreCase
)
Parameters
Name | Type | Description |
---|---|---|
text | String | A string that identifies target text blocks. |
foreColor | Color | A custom foreground color used to paint the text block. |
backColor | Color | A custom background color used to paint the text block. |
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
options | CompareOptions | IgnoreCase | An object that specifies text comparison settings used to locate target text blocks. |
Remarks
The HighlightRanges method locates all text blocks that contain the string specified by the text parameter, and then paints the text blocks with the foreColor and backColor colors.
Use the HighlightWords methods to highlight or custom paint whole words.
See Also