j2associates Posted May 1, 2006 Posted May 1, 2006 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. Quote
Cags Posted May 1, 2006 Posted May 1, 2006 button1.Font = new Font(button1.Font.Name, button1.Font.Size, FontStyle.Bold); Quote Anybody looking for a graduate programmer (Midlands, England)?
j2associates Posted May 1, 2006 Author Posted May 1, 2006 Changing command button text to bold at run time 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) Quote
Cags Posted May 2, 2006 Posted May 2, 2006 True, there are several valid overloads, I'm just used to using the Compact Framework, which is very restrictive. Quote Anybody looking for a graduate programmer (Midlands, England)?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.