文字与边框之间的格式文本框填充 [英] Rich Text Box padding between text and border

查看:249
本文介绍了文字与边框之间的格式文本框填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以添加填充到文本和边框之间的格式文本框控件?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆