How to change font of listview items at runtime in C#


Using the listview item object C# allows you change the back color of the item. Like that you can also change the font family, size etc.

 items.BackColor = System.Drawing.Color.BurlyWood;

But you have to create an object of the Drawing.Font then passes the values ass follows.

items.Font = new System.Drawing.Font(FontFamily.GenericSansSerif, 10, FontStyle.Bold);

Learn more Listview Lessons

ListView and DataSet

ListView as a Repoting tool

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.