ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
377
377
EMPFEHLEN
-
Hallo,
wie kann ich die beiden "Test" strings in der Zeichenkette "test des testens test" farbig hervorheben?
mit folgenden code habe ich leider kein erfolg gehabt:
verwende VS2005
Danke für Hilfe.
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
private: System::Void richTextBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) { int idx; idx = this->richTextBox1->Find("test", RichTextBoxFinds::WholeWord); if (idx >= 0) { this->richTextBox1->Select(idx,4); this->richTextBox1->SelectionFont = gcnew System::Drawing::Font("Verdana", 12, FontStyle::Bold); this->richTextBox1->SelectionColor = Color::Red; } else { this->richTextBox1->SelectionColor = Color::Black; } this->richTextBox1->Select(this->richTextBox1->Text->Length,0); this->richTextBox1->SelectionColor = Color::Black; this->richTextBox1->ScrollToCaret(); }
Ähnliche Themen
-
EPS einfärben
Von llandudno im Forum PhotoshopAntworten: 1Letzter Beitrag: 25.07.08, 13:41 -
Text durch MySQL Daten einfärben?
Von FL08 im Forum PHPAntworten: 4Letzter Beitrag: 04.03.08, 13:43 -
RichEditBox Scroll Fehler
Von Karigos im Forum VisualStudio & MFCAntworten: 3Letzter Beitrag: 16.06.04, 13:18 -
[G++] Wie kann ich Text unter Linux einfärben?
Von bitmaster im Forum C/C++Antworten: 2Letzter Beitrag: 15.07.03, 21:31 -
Einfärben
Von mmmotte im Forum Visual Basic 6.0Antworten: 1Letzter Beitrag: 06.12.02, 14:28





Zitieren
Login






