Home » Category » Microsoft Visual Basic

Microsoft Visual Basic: Coloring the Listview

104| Fri, 30 Nov 2007 23:10:00 GMT| hyperspaced| Comments (1)
Hi,

does anybody know how to color the listview cells individually (report mode) ? For example, if anyone is using ZoneAlarm, will notice that ZoneAlarm features a very cool listview where the background color of various cells can be painted.

Using the sendmessage API I managed to paint an entire row, but I want to paint only selected cells.

Also, how to change color for the highlight bar ?

If anyone can help, please take the time to do so.

Thanks,
Hyperspaced

PS: It would be great if someone could explain in brief the procedure to create a similar listview to ZoneAlarm. I think that ZoneAlarm is using a GREAT listview which could make VB apps ALOT prettier.

Keywords & Tags: coloring, listview, microsoft, visual basic, vb

URL: http://www.programmerbase.com/visual-basic/80605/
 
«« Prev - Next »» 1 helpful answers below.
Maybe there's a simpler way to do what you want. But, here a way I used to change the fonts in some cells.

Your application has to Capture the WM_NOTIFY message that the listbox send to your form.
then you have to call a function that you'll write, in which you select the draw stage you want to customize, and then draw it the way you like.

You have to know some Subclassing, and how to use windows structures.

See MSDN (Custom Draw) it may help you.

gush | Wed, 05 Dec 2007 14:57:00 GMT |

Microsoft Visual Basic Hot Answers

Microsoft Visual Basic New questions

Microsoft Visual Basic Related Categories