开发者

How to bold text With Compact Framework

I have an app written in C# for the compact framework (3.5).

I am trying to dis开发者_C百科play some text on the form in bold.

The Label class does not give me the option to bold my text (I can make it bigger, which eventually gives a bold look, but I want my text 12pt and bold.

Is this possible? If so How?

thanks for any ideas.


FontStyle should work for you

Label1.Font = new Font(Label1.Font, FontStyle.Bold);


You can do it designtime ;)

In visual studio you can extend the font property, to expose the name, font and style property. Also you can add ; style=bold after the font property in visual studio. (or any style for that matter).

If you keep using the code above, i recommend disposing the old font, to prevent a memory leak

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜