|
|
|
|
VB.NET RichTextBox Control.
The Windows VB.NET 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.
Namespace: System::Windows::Forms
System.Windows.Forms (in system.windows.forms.dll)
Creating an new VB.NET Windows forms RichTextBox.
Dim richtextbox As New RichTextBox
Assigning the Dock Style to the RichTextBox Control.
richtextbox.Dock = DockStyle.Fill
Assigning a text value to the VB.NET RichTextBox control.
richtextbox.Text = "RichTextBox Text Area."
Adding a VB.NET RichTextBox control to the form.
Me.Controls.Add(richtextbox)
Assigning the RichTextBox SelectionStart and SelectionLength properties.
richtextbox.HideSelection = False
richtextbox.SelectionStart = 0
richtextbox.SelectionLength = 11
Setting the BackColor for the RichTextBox Control.
richtextbox.BackColor = Color.Beige
Setting the Selected Font style.
richtextbox.SelectionFont = New Font(richtextbox.SelectionFont.FontFamily, richtextbox.Font.Size, FontStyle.Bold)
|
|
|
|
|