
' Specify the font size and string for text displayed below bulleted list. RichTextBox1.SelectedText = "Grapes" + ControlChars.Cr RichTextBox1.SelectionColor = Color.Purple

RichTextBox1.SelectedText = "Oranges" + ControlChars.Cr RichTextBox1.SelectionColor = Color.Orange ' Apply same font since font settings do not carry to next line. RichTextBox1.SelectedText = "Apples" + ControlChars.Cr ' Specify that the following items are to be added to a bulleted list. RichTextBox1.SelectionFont = New Font("Arial", 12) ' Set the Font for the first item to a smaller size Arial font. RichTextBox1.SelectedText = "The following is a list of bulleted items:" + ControlChars.Cr ' Assign the introduction text to the RichTextBox control. RichTextBox1.SelectionFont = New Font("Arial", 16) ' Set the font for the opening text to a larger Arial font RichTextBox1.SelectedText = "Bulleted Text Complete!" RichTextBox1.SelectedText = "Grapes" + "\n" RichTextBox1.SelectedText = "Oranges" + "\n" RichTextBox1.SelectedText = "Apples" + "\n" RichTextBox1.SelectionFont = new Font("Arial", 12) RichTextBox1.SelectedText = "The following is a list of bulleted items:" + "\n" RichTextBox1.SelectionFont = new Font("Arial", 16) RichTextBox1->SelectedText = "Bulleted Text Complete!" Specify the font size and string for text displayed below bulleted list. Semi-colons are not used at the end of lines. Is this what you are looking for Hi vijaykamat, Please remember this is a VB.Net forum.
richTextBox.SelectionFontRichTextBox1->SelectedText = "Grapes \n" You can easily format the content of a rich text box by font property. RichTextBox1->SelectionColor = Color::Purple RichTextBox1->SelectedText = "Oranges \n" RichTextBox1->SelectionColor = Color::Orange Apply same font since font settings do not carry to next line. RichTextBox1->SelectedText = "Apples \n" RichTextBox1->SelectionColor = Color::Red Specify that the following items are to be added to a bulleted list. RichTextBox1->SelectionFont = gcnew System::Drawing::Font( "Arial",12 ) Set the Font for the first item to a smaller size Arial font. RichTextBox1->SelectedText = "The following is a list of bulleted items: \n" Assign the introduction text to the RichTextBox control. RichTextBox1->SelectionFont = gcnew System::Drawing::Font( "Arial",16 ) Set the font for the opening text to a larger Arial font This can be used in a lot of scenarios involving editing of the document, or for example, when implementing Search functionality in your RadRichTextBox and you want to select the found string. This example requires that a RichTextBox control named richTextBox1 is created on a form. The developer is allowed to manipulate the selection programmatically.
Vb.net richtextbox selected text color how to#
RichTextBox1.SelectionColor = following code example demonstrates how to use the SelectionBullet property with the SelectionFont, SelectedText, and SelectionColor properties to create a bulleted list in a RichTextBox control. RichTextBox1.SelectionFont = new Font("Tahoma", 12, FontStyle.Bold) You can also change the size of the text and. You can make the text in the control bold, italic, and underlined. You can use this property to change the font style of text in the RichTextBox. RichTextBox1.SelectionFont = New Font("Tahoma", 12, FontStyle.Bold) If text is selected within the control, the selected text and any text entered after the text selection will have the value of this property applied to it. For an overview, see ColorDialog Component Overview. You can easily format the content of a rich text box by font property. To enable users to set the color in an application, you would typically use the ColorDialog component.

Set the SelectionColor property to an appropriate color. For an overview, see FontDialog Component Overview. To enable users to set the font family, size, and typeface in an application, you would typically use the FontDialog component. Set the SelectionFont property to an appropriate font. The SelectionColor property enables you to change the selected characters' color. You can also use this property to change the size and typeface of the selected characters. You can make the selected characters bold, underlined, or italic, using the SelectionFont property.
Vb.net richtextbox selected text color windows#
The Windows Forms RichTextBox control has numerous options for formatting the text it displays.
