Rich Text Box padding between text and border

前端 未结 11 2146
我在风中等你
我在风中等你 2021-02-02 10:48

Is it possible to add padding into a Rich Text Box control between the text and the border?

I tried docking a rich text box inside of a panel, with its padding for all f

11条回答
  •  被撕碎了的回忆
    2021-02-02 10:55

    Here's an even easier answer. It's not customizable, but it will put a small padding around the entire text -- top, bottom, left and right.

    At design time, set the ShowSelectionMargin property of the RichTextBox to True. When you run, you might notice the margin being applied (from no margin to margin), which looks a little "jerkey". If so, put a Me.SuspendLayout in front of loading the RichTextBox, and put a Me.ResumeLayout after.

提交回复
热议问题