How do I know how many characters fit into the remaining space in the TextBox?
I have a textbox with a specific width and line. How do you know how many characters are coming from the end of the line to the end of the line?
+2
reshefm
source
to share
2 answers
The number of characters that will fit depends on the font and on which characters. If you know what characters you are using, or are using a fixed width font, you can use Graphics.MeasureString () .
+4
Jon B
source
to share
you can't, first because different characters take different widths and second because the text is rendered differently on different platforms.
-3
Evernoob
source
to share