-
June 13th, 2010, 05:18 PM
#1
Changing button text font to bold
Dear code gurus,
I am trying to change the font of the button displayed in the dialog to bold and back (depending on certain events in the program). However, when I try something like
Code:
MyButton.Font.Bold = true;
I receive the folloing error:
"Property or indexer 'System.Drawing.Font.Bold' cannot be assigned to -- it is read only"
Does anybody know how to do it properly?
Thank you in advance!!!
-
June 13th, 2010, 06:04 PM
#2
Re: Changing button text font to bold
Found the answer myself, all you need to do is the following:
Code:
MyButton.Font = new Font(MyButton.Font, FontStyle.Bold);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|