views:

17

answers:

1

The TextBox control (in a .NET winforms application) seems to hard limit line lengths to 1024 characters, even with the WordWrap property set to false. Is there a way override this?

I need to view lengthy data in a visual sense. Currently a line of 2000 characters wraps onto the second line and causes the right edge of several lines to be jagged rather than aligning.

+1  A: 

The problem is that the Windows Edit control that the TextBox uses for its implementation has a limit of 1024 characters per line. This lmit has been around forever. Rather than fix it (which could cause problems with programs that somehow rely on this limit), they simply introduced the RichEdit control that doesn't have that limit and has many more features.

Gabe