Label Font Size - Read Only?

bjwade62

Well-known member
Joined
May 25, 2006
Messages
50
Programming Experience
3-5
Anyone know why Label.font.size and Label.font.bold are read only at runtime in .NET?

Is there a work around?
 
Create a new font from the old, changing the properties you need, assign this new font. Font contructor is overloaded for many possibilities.
VB.NET:
[SIZE=2]Label1.Font = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Font(Label1.Font.FontFamily, 10)[/SIZE]
 
Back
Top