More than 32k in a TextBox

Posted by Alex_u4a on 24-Feb-2010 08:23

I'm trying to add more than 32k of data in a TextBox. I'v set the MaxLength to 0 so that it can hold more than 32k, but when I try to add text to the TextBox:Text property so that it exceeds 32k of characters I get an error message (11678). With the old Progress editor (defined as LARGE) I was able to handle the text using  editor methods (like 'INSERT-STRING'). But the TextBox:Text property is just a Character datatype and the only way to add text seems to be using '+'.

Any suggestions on how to work with large text in a TextBox (or UltraTextEdtiror)?

All Replies

Posted by Alex_u4a on 02-Mar-2010 08:36

anyone?

Posted by marko.rueterbories on 02-Mar-2010 08:47

Hey,

I had a simmilar problem while adding large textfiles to a TextBox. I used RichTextBoxes instead and now it works fine.

Hope that helps you!

Regards,

Marko

Posted by Alex_u4a on 02-Mar-2010 09:16

Thanks for your suggestion. Unfortunalely that's not the solution. A normal textbox has a default value for MaxLength of 32767. A RichTextBox has a default MaxLength of 2147483647. So without any modifications a RichTextBox can hold more data, but this can also easily be achieved on a TextBox as well by increasing the MaxLength.

The problem is in handling the text. If you type more than 32k of characters by hand then it's probably not a problem, but what I am trying to do is: programmatically add a string of 3000 characters to a textbox that already holds 30,000 characters (textBox1:Text = textBox1:Text + myText). In the old days this could be achieved by using methods like "INSERT-STRING" on the editor-widget.

Posted by Alex_u4a on 02-Mar-2010 10:26

Just found an 'AppendText' method on the TextBox... (still having some other problems with that as well, but I seems to solve the 32k problem)

This thread is closed