Wrapping Text in a rich textbox, but not word wrapping it

后端 未结 4 1264
醉梦人生
醉梦人生 2021-01-13 07:06

I have a Windows Form with a Rich Textbox control on the form. What I want to do is make it so that each line only accepts 32 characters of text. After 32 characters, I want

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-13 07:21

    If you are using only (one) fixed width font for text within rich text box then you can use MeasureString to count the width needed for 32 characters and then adjust rich text box width accordingly. Thats should do wrapping within 32 characters.

提交回复
热议问题