RichTextBox Control.
The Windows RichTextBox control allows users to enter and edit text using more advanced
text formatting offered with the TextBox control. The RichTextBox control
can load RFT format as well as TXT format files for reading or editing and provide
methods for saving the edited files. The RichTextBox control can also be set to
detect Url information and respond to the user clicking the Url.
Some advanced RichText formatting include.
SelectionFont.
SelectionColor.
SelectionAlignment.
SelectionBackColor.
SelectionBullet.
SelectionHangingIndent.
SelectionProtected.
Namespace: System.Windows.Forms
Assembly: Systems.Windows.Forms.dll
using System.Windows.Forms;
Calling: System.Windows.Forms.RichTextBox
Creating a new System.Windows.Forms.RichTextBox control.
RichTextBox richTextBox1 = new RichTextBox();
To add the RichTextBox control to the form.
this.Controls.Add(richTexBox1);
To fill the form with the RichTextBox control.
richTextBox1.Dock = DockStyle.Fill;
You can prevent the user from using the short cut keys for the RichTextBox control.
richTextBox1.ShortcutsEnabled = false;
To set the RichTextBox to detect Url's.
richTextBox1.DetectUrls = true;
To create the LinkClicked event for when the user clicks on the Url within the RichTectBox.
richTextBox1.LinkClicked+=new LinkClickedEventHandler(richTextBox1_LinkClicked);
To respond to the LinkClicked event.
private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e) { System.Diagnostics.Process.Start(e.LinkText);
}
Infragistics.
Infragistics controls do not include the RichTextBox control as yet. A fully completed
RichTetBox control which would include all the styled formatted toolbars merging
with existing application toolbars would really compliment the control set.
|