listview invalidate problem

O

ohmmega

hi folks,

i've created an listviewitem[] collection and added it with the
addrange method to a listview. so far so good. the listview-style is
set to details and the items are formatted with different
backgroundcolors.

the problem: my app won't refresh the item-format, means i see the
content but not the backgroundcolors and the correct fontsettings.
when i switch to another window and back to my app everything is
alright.

i suspect the application stylesettings:
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
this.SetStyle(ControlStyles.UserPaint, true);
this.UpdateStyles();

any ideas?

thanks
ohm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top