Font is immutable. You cannot change its value. However, you can set the
Font property on the control you're working with, say,
this.ActiveControl.Font = new Font(this.ActiveControl.Font.FontFamily, 8.25,
this.ActiveControl.Font.Style);
-vJ
new Font(this.Font.FontFamily, 12, this.Font.Style);
"Jeff N" <Jeff
N@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
It it possible to change a button's or text box's font size during
runtime?
When I try to build my application with this code:
this.ActiveControl.Font.Size = "8.25";
I get this error message:
Property or indexer "System.Drawing.Font.Size' cannot be assigned to -- it
is read only
I can change a button's text property during runtime, but I'd also like to
change the font size as well.