In Visual c# Express Edition, is it possible to make some (but not all) items in a ListBox bold? I can’t find any sort of option for this in the API.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to change listbox’s DrawMode to DrawMode.OwnerDrawFixed. Check out these articles on msdn:
DrawMode Enumeration
ListBox.DrawItem Event
Graphics.DrawString Method
Also look at this question on msdn forums:
Question on ListBox items
A simple example (both items – Black-Arial-10-Bold):