开发者

BOLD and ITALIC to the same text in RTF

Can we able to format BOLD and ITALIC to the same开发者_运维问答 text?

Regards, Poornima


Yes. The System.Drawing.FontStyle enumeration is a flags enumeration. To combine styles, simply use the OR operator.

Assuming you're applying the font to the selected portion of the text, it could look like:

RichTextBox1.SelectionFont = _
New System.Drawing.Font("Arial", 14, FontStyle.Bold Or FontStyle.Italic)
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜