How can I change the font properties, such as bold text etc, of a label during runtime?
I tried setting label1.Font.Bold to true but it says that it is read only.
Please help.
This is a discussion on Changing a labels font properties within the C# Programming forums, part of the General Programming Boards category; How can I change the font properties, such as bold text etc, of a label during runtime? I tried setting ...
How can I change the font properties, such as bold text etc, of a label during runtime?
I tried setting label1.Font.Bold to true but it says that it is read only.
Please help.
Hi,
You can assign a new Font to the Label1.Font property like this:
Code:label1.Font = new Font(label1.Font, FontStyle.Bold);![]()
Regards
Pete
Thanks!