RichTextBox font style button for Bold and/or Italic (how to code so more than one can be chosen instead of replacing

前端 未结 5 978
小鲜肉
小鲜肉 2021-01-27 19:48

Right now I am using some buttons with the following code:

richTextBox1.SelectionFont = new Font(\"Tahoma\", 12, FontStyle.Bold);
richTextBox1.SelectionColor = S         


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-27 20:36

    use this code

    richTextBox1.Font = new Font("Tahoma", 12, FontStyle.Bold | FontStyle.Italic);
    

提交回复
热议问题