文字与边框之间的格式文本框填充 [英] Rich Text Box padding between text and border
问题描述
是否可以添加填充到文本和边框之间的格式文本框控件?
Is it possible to add padding into a Rich Text Box control between the text and the border?
我试过对接面板内部的丰富的文本框,它的所有四个边填充设置为10,并且完成了我想要的东西。只有一次,是需要丰富的文本框的垂直滚动条,被填充为好。
I tried docking a rich text box inside of a panel, with its padding for all four side set to 10 and that accomplished what I wanted. Except once the vertical scroll bar for the rich text box is needed that gets padded as well.
推荐答案
在RichTextBox没有padding属性
The RichTextBox has no padding property.
快速和肮脏的填充可以通过将RichTextBox的在面板,它具有相同的背景色<实现/ code>属性作为RichTextBox的(通常
Color.White
)。
Quick and dirty padding can be achieved by putting the RichTextBox in a Panel, which has the same BackColor
property as the RichTextBox (usually Color.White
).
然后,设置码头
在RichTextBox的属性填写
,并用填充
面板控件的属性。
Then, set the Dock
property of the RichTextBox to Fill
, and play with the Padding
properties of the Panel control.
这篇关于文字与边框之间的格式文本框填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!