How do I set a textbox's text to bold at run time?

前端 未结 5 1422
野的像风
野的像风 2020-12-08 12:44

I\'m using Windows forms and I have a textbox which I would occassionally like to make the text bold if it is a certain value.

How do I change the font characteristi

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 13:03

     txtText.Font = new Font("Segoe UI", 8,FontStyle.Bold);
     //Font(Font Name,Font Size,Font.Style)
    

提交回复
热议问题