How do I paint a Custom ListView in DesignMode?

T

Tom P.

I am inheriting from a ListView and doing my own painting. I am
overriding the OnDrawSubItem() method and it works fine... at runtime.
At design time it just looks system gray.

I've got the following styles set:
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.Selectable, true);
this.SetStyle(ControlStyles.UserMouse, true);
this.SetStyle(ControlStyles.UserPaint, true);

I've even set these styles for the base object. I can see the OnPaint
event fire during design time, but not the OnDrawSubItem

Is there a way to paint during design time?

Tom P.
 

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