How do I change a command button text font to bold at run time

j2associates

Newcomer
Joined
Apr 6, 2006
Messages
6
Hello all,

Based on certain situations, I want to change the Text on my command button to bold, similarly to the way non default values are bold in the property grid at design time.

When I try to change commandButton.Font.Bold it is read only. Thanks in advance for any ideas and/or suggestions.
 
Changing command button text to bold at run time

Cags said:
C#:
button1.Font = new Font(button1.Font.Name, button1.Font.Size, FontStyle.Bold);

Thanks CAGS! This also works:

button1.Font = New Font(button1.Font, FontStyle.Bold)
 
Back
Top