我需要某人的帮助才能开始。我有一个(WinForm)RichTextBox和我的文字:
RichTextBox1.text = "I'm noob in Stackoverflow" 'the word "noob" is strikeout
在RichTextBox中间找到某种字体的最简单方法是什么?
答案 0 :(得分:2)
在richtextbox中设置文本......
RichTextBox1.Text = "I'm noob in Stackoverflow"
RichTextBox1.Select(5, 4)
RichTextBox1.SelectionFont = _
New Font(RichTextBox1.SelectionFont.Name, _
RichTextBox1.SelectionFont.Size, FontStyle.Strikeout)
并测试一些文字的字体......
RichTextBox1.Select(5, 4)
Dim FNT As Font = RichTextBox1.SelectionFont
Dim IsStrikout As Boolean = FNT.Strikeout