RichTextBox Select Method Bug

G

Guest

I am currently working to create a VB program that will do more detailed
in-file text search functions than windows has to offer. I have a form with a
RichTextBox control to display the text that has been found in the files. The
problem is that when a search has been found that is at the very start of the
file and the .select method is used to select just the first portion it ends
up selecting everything in the RichTextBox control regardless of the
end-selection index. This behavior does not happen if the selected text is
anywhere else in the RichTextBox control. Has anyone else observed this bug?

Also I could avoid using the RichTextBox control methods to format my search
finds if I could format them in my array before loading them into the
control. Could anyone give me a suggestion as to how to do this? My array
holds only text and not formats and I'm not sure how the best way would be to
mark portions of the text for reformatting on or before load. The formatting
of the text helps the user identify where a search string has been found in
the file and I don't want to permanently keep the format changes. Perhaps I'm
going about this in the wrong direction. Any suggestions would be helpful.
Thanks in advance.
 
G

Guest

It must be something I'm doing wrong because I created another simple program
to recreate the bug and it's not coming up. I'm using the same numbers
though. Let me do more research and figure out why it's not happening now.
Still any suggestions on showing format would be appreciated.
 
G

Guest

I found the problem and it was my own fault. sorry about that. This post can
be deleted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top