Textbox MaxLength > 32767 has no effect, may be documentation oversight
See original GitHub issueEnvironment
Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.6.0 Preview 3.0 <TargetFramework>net8.0-windows</TargetFramework> <LangVersion>preview</LangVersion> <Platforms>x64</Platforms>
.NET version
<TargetFramework>net8.0-windows</TargetFramework>
Did this work in a previous version of Visual Studio and/or previous .NET release?
I don’t know
Issue description
Setting TextBox MaxLength to e.g. 99_999, it still accepts only the first 32_727 characters.
Steps to reproduce
Put a textbox on a windows form. Copy text longer than 32_727 characters. Paste into this textbox. Textbox will accept the first 32_727 characters. Set MaxLength to 99_999. Textbox still accepts the first 32_767 characters only.
Diagnostics
//
// TbInput
//
TbInput.Location = new Point(7, 124);
TbInput.MaxLength = 99999;
TbInput.Multiline = true;
TbInput.Name = "TbInput";
TbInput.ScrollBars = ScrollBars.Vertical;
TbInput.Size = new Size(846, 523);
TbInput.TabIndex = 21;
TbInput.TextChanged += TbInput_TextChanged;
Issue Analytics
- State:
- Created 5 months ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Textbox MaxLength > 32767 has no effect, may be ...
Windows Forms is a .NET UI framework for building Windows desktop applications. - Textbox MaxLength > 32767 has no effect, may be documentation...
Read more >How to override textbox's maxlength Properties for longer ...
Solution 1. Accept Solution Reject Solution. (1) Max Length never affects what a program can put in a text box, it only
Read more >TextBox MaxLength over 32767 has no effect
Hi all I want to implement a textbox that includes a fixed string and user can't change it and just enter info after...
Read more >TextBoxBase.MaxLength Property (System.Windows.Forms)
In code, you can set the value of the Text property to a value that has a length greater than the value specified...
Read more >How to limit the number of characters allowed in a textbox?
The underlying problem is a multi-line textBox is rendered as a text-area and MaxLength is removed. We can also fix in the C#...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I also do not reproduce the problem: when setting TextBox MaxLength to 99999 or 32767, it can accept corresponding number of characters.
Sorry again.