HighlightText()
Contents
[
Hide
]IPresentation::HighlightText(System::String, System::Drawing::Color) method
Highlights all matches of the sample text with the specified color.
virtual void Aspose::Slides::IPresentation::HighlightText(System::String text, System::Drawing::Color highlightColor)=0
Arguments
Parameter | Type | Description |
---|---|---|
text | System::String | The text to highlight. |
highlightColor | System::Drawing::Color | The color to highlight the text. |
Remarks
The following code sample shows how to highlight text in a PowerPoint presentation.
auto presentation = System::MakeObject<Presentation>(u"SomePresentation.pptx");
// highlighting all separate 'the' occurrences
presentation->HighlightText(u"the", System::Drawing::Color::get_Violet());
presentation->Save(u"SomePresentation-out2.pptx", SaveFormat::Pptx);
IPresentation::HighlightText(System::String, System::Drawing::Color, System::SharedPtr<ITextSearchOptions>, System::SharedPtr<IFindResultCallback>) method
Highlights all matches of the sample text with the specified color.
virtual void Aspose::Slides::IPresentation::HighlightText(System::String text, System::Drawing::Color highlightColor, System::SharedPtr<ITextSearchOptions> options, System::SharedPtr<IFindResultCallback> callback)=0
Arguments
Parameter | Type | Description |
---|---|---|
text | System::String | The text to highlight. |
highlightColor | System::Drawing::Color | The color to highlight the text. |
options | System::SharedPtr<ITextSearchOptions> | Text search options ITextSearchOptions. |
callback | System::SharedPtr<IFindResultCallback> | The callback object for receiving search results IFindResultCallback. |
Remarks
The following code sample shows how to highlight text in a PowerPoint presentation.
auto presentation = System::MakeObject<Presentation>(u"SomePresentation.pptx");
auto textSearchOptions = System::MakeObject<TextSearchOptions>();
textSearchOptions->set_WholeWordsOnly(true);
// highlighting all separate 'the' occurrences
presentation->HighlightText(u"the", System::Drawing::Color::get_Violet(), textSearchOptions, nullptr);
presentation->Save(u"SomePresentation-out2.pptx", SaveFormat::Pptx);
See Also
- Typedef SharedPtr
- Class String
- Class Color
- Class IPresentation
- Class ITextSearchOptions
- Class IFindResultCallback
- Namespace Aspose::Slides
- Library Aspose.Slides