View Single Post
Old Sep 24th, 2005, 3:38 PM   #4
brokenhope
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 126
Rep Power: 4 brokenhope is on a distinguished road
Sorry for all the multiple posts but I cant edit the posts, anyways, ill post one last thing, since the more testing I do the more problems im finding.

The problem its having is with the regex, since when its split the regex contains a space, a tab, and several single characters ({}()[]). The highlight position is getting off because of that. The regular expression only splits the line by the character, it doesnt leave in what it was split by, so I cant add the size of the tab, or space, or single character to it correctly, and its causing a lot of problems, the count is getting off even if one of those exists and the highlight fails... is there any way I can split and leave in the split key or something? or any way to find out what it was split with?

[code]
Dim rexRegEx As New Regex("([{}();])")
strLine = rexRegEx.Split(rtbTextBox.Lines(iCurrentLine - 1))
[code]

Also I had an idea to prevent the flicker, which is eaisly noticable. Is it possible for me to create a "Dummy" rich text box and apply the highlight to that, then make the original rtb equal to that? or something like that?
brokenhope is offline   Reply With Quote