ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Find And Run Robot

RichEdit line insertion error...

<< < (5/5)

mouser:
sure, that's a great idea.  btw the solution here is relevant for C++ Builder and Delphi.  It may not be direclty relevant for other languages that use the RichEdit control.

the first thing to realize is that it is a bug in the RichEdit control.

normally to set the text in a RichEdit control you could do this:
InfoText->Lines->Text=message;
--- End quote ---

instead i changed it to this:
InfoText->Lines->Text="";
InfoText->SelStart=0;
InfoText->SelText=message;
--- End quote ---


i also went into the properties for the RichEdit and changed MaxLength from 0 to 16000,
which should not be necesary but i figured i might as well.

the ideas to try these things came from google groups posts describing that RichEdit has some bugs that are triggered when you try to set text the normal way and that you should try setting it using SelText kludge.  Seems to work!

Thanks for helping me find this lanux, it really is appreciated since this could be a really nasty surprise for anyone trying to enter a license key in one of our programs!

lanux128:
hi there mouser,

i found another instance of the RichEdit error... ;-)
this time the error propped up in this program, Icon Factory 1.1...

RichEdit line insertion error...

best regards,
lanux

mouser:
did you pass on a pointer to this thread to them i hope?

lanux128:
yeah, i did but the author replied saying he's not developing the software anymore...

best regards,
lanux

Navigation

[0] Message Index

[*] Previous page

Go to full version