By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,056 Members | 1,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,056 IT Pros & Developers. It's quick & easy.

Listviewitem font set to bold

P: n/a
How do I set a particular listview item text to bold?
Sep 28 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a

"Alan T" <al************* in message
How do I set a particular listview item text to bold?

Well, if you are adding it to a listview called lstView:

ListViewItem NewItem = new ListViewItem();
NewItem.Text = "foo";
NewItem.Font = new Font(lstView.Font, FontStyle.Bold);

You should be able to also use the font line referencing an item in the list
view items collection... something like

lstView.Items[idx].Font = new Font(lstView.Font, FontStyle.Bold);

Sep 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.