You can either use a combination of SelectedText and SelectionFont e.g.
richTextBox1.SelectedText="The button is now ";
richTextBox1.SelectionFont=New
Font(currentFont.FontFamily,currentFont.Size,FontS tyle.Bold);
richTextBox1.SelectedText="disabled";
or else pipe in the RTF characters directly e.g.
richTextBox1.Rtf = @"{\rtf1\ansi The button is now \b disabled\b0.}";
Cathal
"Alvo von Cossel I" <Al************@discussions.microsoft.com> wrote in
message news:61**********************************@microsof t.com...
hi,
i have a richtextbox in my app. when a button is disabled, the richtextbox
control should say "The button is now disabled". only the word disabled
should be emboldened. how do i make only the word bold?
my code so far is
if (Button1.Enabled = false)
{
richTextBox1.Text = "The button is now disabled";
}
--
Alvo von Cossel I of Germany