现在的位置: 首页 > 综合 > 正文

关于RichTextbox的一些属性

2013年09月09日 ⁄ 综合 ⁄ 共 931字 ⁄ 字号 评论关闭

ShowSelectionMargin

这个属性设置为true后,就会在richtextbox文本最左侧多空出1个字符的宽度,在此空白处单击鼠标左键就会选中当前正行文本,双击(或者连续单击3次?)就会做全选的操作

 

You can use this property to enable the user to easily select lines of text in the RichTextBox. The selection margin is added to the left side of the RichTextBox. This margin makes it easier for the user to select text starting on the left side of the control. The user can click in the selection margin to select a single line of text or double-click to select the entire paragraph that the line double-clicked is contained within.

NoteNote

If the ShowSelectionMargin property is set to true, setting the ScrollBars property to RichTextBoxScrollBars.Horizontal, RichTextBoxScrollBars.Vertical, or RichTextBoxScrollBars.Both will not cause scroll bars to be displayed. In order to display scroll bars while the ShowSelectionMargin property is set to true, set the ScrollBars property to RichTextBoxScrollBars.ForcedHorizontal, RichTextBoxScrollBars.ForcedVertical, or RichTextBoxScrollBars.ForcedBoth.

 

WordWrap

当文本长度超过显示的宽度时是否自动换行,如果设为false,当长度过长时就会出现水平滚动条

抱歉!评论已关闭.