private void ToolStripButtonBold_CheckedChanged(object sender, EventArgs e)
{
Font oldFont;
Font newFont;
bool checkState = ((ToolStripButton)sender).Checked;
//Get the font that is being used in the selected text.
oldFont = this.richTextBoxText.SelectionFont;
if (!checkState)
newFont = new Font(oldFont, oldFont.Style & ~FontStyle.Bold); else
newFont = new Font(oldFont, oldFont.Style | FontStyle.Bold);
//Insert the new font and return focus to the RichTextBox
this.richTextBoxText.SelectionFont = newFont;
this.richTextBoxText.Focus();
this.ToolStripMenuItemBold.CheckedChanged -= new EventHandler(ToolStripMenuItemBold_CheckedChanged);
this.ToolStripMenuItemBold.Checked = checkState;
this.ToolStripMenuItemBold.CheckedChanged += new EventHandler(ToolStripMenuItemBold_CheckedChanged);
}
this one newFont = new Font(oldFont, oldFont.Style & ~FontStyle.Bold);
i can't understand ,please tell me ,thank you