How to 'align' text in RichTextBox C#?

前端 未结 5 654
天命终不由人
天命终不由人 2020-12-17 16:27

How do I align the text in a RichTextBox?

\"RTB\"

Basically, the RTB contains:

\"--testing\"

5条回答
  •  天命终不由人
    2020-12-17 17:17

    Unless it is very necessary for you to use a rich textbox, you can simply use a textbox and choose alignment as

    textbox.TextAlign = HorizontalAlignment.Center;/*could be left, right or center*/
    

提交回复
热议问题