Re: Rich Text box masks Line Feed
- From: "Alan Gillott" <argillott.x@xxxxxxxxx>
- Date: Fri, 29 Feb 2008 03:36:45 -0500
You scare me!
I have a complex VB6 Script editing application that started life as a text box before I reimplemented it with a rich text box: the thoery was, and according to my .net text books (sorry about the pun) that a RTB control should substitute for a text control WITHOUT ANY CHANGES: what you state suggests that this isn't true. it also means that I need to review the effort of migrating this app to VB200x as it has HUNDREDS of references to CR throughout the application: I was anticipating hours of pain and suffering as it is (hence it is still VB6) fixing the hundreds of dim as objects that are going to spring up when I convert without actually having to review functionality too. Lots of Mid statements with explicit lengths looking for keywords and scans of partial lines attempting to parse vbscript for syntax errors. The problem is, bits of VB6 keep breaking on Vista (for example Help is broken now!) AAARRRGGGGHHHH! My head hurts!
A
"Justin Roberts" <JustinRoberts@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:19300E05-F128-40D5-83A0-01C7C4E9476C@xxxxxxxxxxxxxxxx
Yes, I did mean the standard Forms.RichTextBox
Apologies for not being clear on that one.
Also, you're right about the linefeed. I actually meant the Carriage Return
(vbCR) character. Sorry for the bad post.InStr(rtb.Text, vbCR) always = 0
I need all the CR characters to be included as part of in my Text,
SelectionStart, SelectionLength, SelectedText, etc. properties.
Regards
Justin.
When you say "RTB control", I assume you mean something like
rtb As System.Windows.Forms.RichTextBox
I don't get the behavior you describe. rtb.SelectedText contains line feeds
for me, and they are included in the length. If rtb contains linefeeds, then
InStr(rtb.Text, vbLf) > 0.
What's the problem?
.
- References:
- Rich Text box masks Line Feed
- From: Justin Roberts
- Rich Text box masks Line Feed
- Prev by Date: Re: disable menu
- Next by Date: e.error in RunWorkerCompleted
- Previous by thread: RE: Rich Text box masks Line Feed
- Next by thread: Re: "Automatically adjust clock for daylight saving changes"
- Index(es):
Relevant Pages
|