开发者

BOLD and ITALIC to the same text in RTF

开发者 https://www.devze.com 2023-02-22 22:18 出处:网络
Can we able to format BOLD and ITALIC to the same开发者_运维问答 text? Regards, PoornimaYes. The System.Drawing.FontStyle enumeration is a flags enumeration.

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

精彩评论

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

关注公众号