Click here to Skip to main content
Click here to Skip to main content

Tagged as

Make a control's text font bold at runtime in a windows application

, 8 Nov 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
Code snippet to make a control's text font style to bold dynamically at runtime in a windows application
Hi,
 
This code snippet is to change the font style of a control. This is specially useful for controls that are dynamically added from code at runtime.
 
lblSample.Font = new Font(lblSample.Font, FontStyle.Bold);
chkSample.Font = new Font(chkSample.Font, FontStyle.Bold);
 
Thanks,
DnG

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

No Biography provided

Comments and Discussions

 
GeneralThanks for voting. But, there will be beginners as well, who... PinmemberTheDotNetGeek17-Nov-10 18:23 
GeneralReason for my vote of 2 Extremely basic info PinmemberPSU Steve15-Nov-10 10:52 
GeneralReason for my vote of 4 Thanks! PinmemberMaggi38-Nov-10 5:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.141022.2 | Last Updated 8 Nov 2010
Article Copyright 2010 by TheDotNetGeek
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid