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.
| Note |
If the ShowSelectionMargin property is set to true, setting the { function anonymous() { function onclick() { Track('ctl00_MainContent_ctl21_ctl00_contenthere|ctl00_MainContent_ctl21_ctl00_ctl00',this); } } }" href="http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox.scrollbars(VS.80).aspx">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,當長度過長時就會出現水平捲軸