0
我已经知道如何更改字体:如何更改文本的字体?
private void toolStripButton2_Click(object sender, EventArgs e)//italic
{
//maintext is the richTextBox
maintext.SelectionFont = new Font(maintext.Font, FontStyle.Italic);
maintext.SelectionStart = maintext.SelectionStart + maintext.SelectionLength;
maintext.SelectionLength = 0;
maintext.SelectionFont = maintext.Font;
}
但是我怎么允许两种字体的同时,使字体恢复正常? 也可以让你不必先键入文字然后选择它;只需按下按钮。