Example #1
0
 /// <summary>
 /// Sets the language option.
 /// </summary>
 /// <param name="richTextBox">The rich text box.</param>
 /// <param name="value">The value.</param>
 public static void SetLanguageOption(this RichTextBox richTextBox, RichTextBoxLanguageOptions value)
 {
     if (richTextBox.InvokeRequired)
     {
         richTextBox.BeginInvoke(new MethodInvoker(() => richTextBox.SetLanguageOption(value)));
     }
     else
     {
         richTextBox.LanguageOption = value;
         richTextBox.Refresh();
     }
 }
Example #2
0
		public RichTextBox() {
			accepts_return = true;
			auto_size = false;
			auto_word_select = false;
			bullet_indent = 0;
			base.MaxLength = Int32.MaxValue;
			margin_right = 0;
			zoom = 1;
			base.Multiline = true;
			document.CRLFSize = 1;
			shortcuts_enabled = true;
			base.EnableLinks = true;
			richtext = true;
			
			rtf_style = new RtfSectionStyle ();
			rtf_section_stack = null;

			scrollbars = RichTextBoxScrollBars.Both;
			alignment = HorizontalAlignment.Left;
			LostFocus += new EventHandler(RichTextBox_LostFocus);
			GotFocus += new EventHandler(RichTextBox_GotFocus);
			BackColor = ThemeEngine.Current.ColorWindow;
			backcolor_set = false;
			language_option = RichTextBoxLanguageOptions.AutoFontSizeAdjust;
			rich_text_shortcuts_enabled = true;
			selection_back_color = DefaultBackColor;
			ForeColor = ThemeEngine.Current.ColorWindowText;

			base.HScrolled += new EventHandler(RichTextBox_HScrolled);
			base.VScrolled += new EventHandler(RichTextBox_VScrolled);

			SetStyle (ControlStyles.StandardDoubleClick, false);
		}