C#: Multiline TextBox with TextBox.WordWrap Displaying Long Base64 String
Posted
by
Peter Lee
on Stack Overflow
See other posts from Stack Overflow
or by Peter Lee
Published on 2011-01-02T00:09:14Z
Indexed on
2011/01/02
1:54 UTC
Read the original article
Hit count: 921
Hi,
Happy New Year!
I have a textbox to display a very long Base64 string. The TextBox.Multline = true
and TextBox.WordWrap = true
.
The issue is caused by the auto-word-boundary detection of the TextBox itself. The Base64 string has '+' as one of the 64 characters for Base64 encoding. Therefore, the TextBox will wrap it up at the '+' character, which is not what I want (because the use might think there is a newline character around the '+' character).
I just want my Base64 string displayed in Mulitline-mode in TextBox, but no word boundary detection, that is, if the TextBox.Width
can only contain 80 characters, then each line should have exact 80 characters except the last line.
I'm not sure if I made myself clear.
Thanks.
Peter
© Stack Overflow or respective owner