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!!!
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);