listview invalidate problem

  • Thread starter Thread starter ohmmega
  • Start date Start date
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
 
Back
Top