开发者

How do I change the font of the selected text in a rich text box in c#

I am able to change the text of the whole RTB, but not the selected text.

I'm currently trying something around this:

richTextBox1.SelectedText = fontDialog1.Font;

I know that the above method definitely won't work, but开发者_StackOverflow中文版 it's the current course of action that I'm trying.

But I just don't know how to access the font "field" for the selected text. Any ideas?


richTextBox1.SelectionFont = new Font("Arial", 16);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜