.NETGURU
32K limit in TextBox ?!
Messages   Related Types
This message was discovered on microsoft.public.dotnet.languages.csharp.

Post a new message to this list...

Paul E Collins
I'm writing an application with a TextBox control on its main form.
I'm running the application under WinXP Pro, so (as I understand it)
there should be no practical limit to the number of characters in a
text box.

However, when I paste in a large amount of text, the text box
truncates it at exactly 32K characters. This is a problem, because I
need to know exactly how many of each character were pasted; besides,
I wasn't expecting the text box to "fill up" under normal
circumstances.

Why would my text box truncate text at 32K, when I'm absolutely sure I
was able to paste much more than 32K of text in the same application
before?

P.

Reply to this message...
 
    
Paul E Collins
"Paul E Collins" <Click here to reveal e-mail address> wrote:

> [pasted text is truncated at 32K chars in TextBox]

Okay - I found the "problem". My paste code was setting SelectedText.
It seems that SelectedText truncates any string at 32K characters,
even though there's nothing about this in the documentation.

I'm now setting Text instead, and it works correctly.

P.

Reply to this message...
 
    
Zürcher See
TextBox has a limit TextBox.MaxLength

"Paul E Collins" <Click here to reveal e-mail address> schrieb im Newsbeitrag
news:chpbhd$ria$Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Paul E Collins
"Zürcher See" <Click here to reveal e-mail address> wrote:

> TextBox has a limit TextBox.MaxLength

Thanks, but I've set MaxLength to zero ("no limit") and I still get
the 32K problem.

P.

Reply to this message...
 
    
Ignacio Machin \( .NET/ C# MVP \)
Hi,

I do remember this was discussed a couple of months ago. Take a look at the
archives.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Paul E Collins" <Click here to reveal e-mail address> wrote in message
news:chpiej$aep$Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 
System.Web.UI.MobileControls.TextBox
System.Web.UI.WebControls.TextBox
System.Windows.Forms.TextBox




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification