[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • Last Modified:

Creating a Bold version of an existing font object

Hi,

I'm having trouble creating a new font.  I have an existing font, and I'd simply like to make it Bold.  I gather that I'll need to recreate it, using various settings retreived from the existing font, except with a different value for "public enum FontStyle".  But I'm a little unsure which constructor for Font() to use.

Any help would be greatly appreciated.


Thanks,
Bob
0
ba272
Asked:
ba272
1 Solution
 
adambuttCommented:
Just create a new font, using the first one as a prototype, and tell the constructor to make it bold.

Font boldFont = new Font(this.label1.Font, FontStyle.Bold);
this.label2.Font = testFont;
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now