Vaccano
Vaccano

Reputation: 82507

How to bold text With Compact Framework

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

I am trying to display 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.

Upvotes: 1

Views: 1509

Answers (2)

Roy
Roy

Reputation: 648

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

Upvotes: 2

Hun1Ahpu
Hun1Ahpu

Reputation: 3355

FontStyle should work for you

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

Upvotes: 3

Related Questions