|
-
Jun 12th, 2019, 08:39 PM
#1
Thread Starter
Lively Member
[RESOLVED] Change Color / Format Text
I am trying to highlight all text that is between all elements between < >, ( ), { }, [], " ". However, the only thing I really know how to do is to find and highlight text within a richtextbox to the exact string. What I am trying to accomplish is to highlight certain strings of a html file or xaml file that are between those symbols. I have looked around on forums and such, and I cannot find anything relating to this. If you guys can help refer me to a place this has been discussed or help throw together some code, I'd really appreciate it. This is what I have for finding specific text and highlighting it (not what I tho...)
Code:
Dim loc As Int16
If txtbox1.Text.Contains("<html>") Then
loc = txtbox1.Find("<html>")
txtbox1.Select(loc, 6)
txtbox1.SelectionColor = Color.Red
'ForeColor = Color.Red
End If
But for an example for a string "asdfg(neededtexthere) 1234"
the "neededtexthere" would need to be changed to a different fore color
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|