Click here to Skip to main content
15,881,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,
I'm having a strange problem with a textbox.
When I fill-in the textbox line by line I see that there is not limit in the number of lines or chars (almost) but when I use the EngMatLib to evaluate a Matlab exrpession (which returns a 4000 chars string) I see that the textbox is not able to show the entire string and truncates it.
It looks like there is a limit of about 4000 chars per single line of a textbox. How can I overcome this king of problem?

thanx in advance

Luca
Posted
Updated 10-Mar-21 17:54pm

Unless you have changed it, the MaxLength for a single line in a TextBox defaults to 32K. It may not be the textbox which is giving you this problem, try pasting your data into notepad or similar and see if it works there first.
Alternatively, is your text multiline, and your textbox single line?
 
Share this answer
 
TextBox MaxLength is 32767,
Set TextBox1 MultiLine as True
And Run your app.
 
Share this answer
 
v3
Simply set the MAXLength property to the desired length you required
 
Share this answer
 
 
Share this answer
 
v3
Comments
DaveAuld 26-Oct-10 7:05am    
First link is broken....
Tarun.K.S 26-Oct-10 7:11am    
Thanks DaveAuld! i have updated the answer.
Lukkino 26-Oct-10 8:19am    
Thanx Tarun,
but it looks like is a problem related to the EngMatLib library, because wrote a test code filling a string with 18K chars and assigning this string to a textbox.text with no problems. May be the problem is the way the EngMatLib.evaluate string is formatted.
Tarun.K.S 26-Oct-10 8:43am    
i suspect that might be the reason!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900