Solved it!
ListView control is just a wrapper around the control ComCtl and it doesn't fire the OnPaint event.
Instead I needed to override the WndProc event and look for the message 20 (means redraw backgroun)
To force a redraw I use Invalidate()
Thanks anyway
I have tried to draw it before base.OnPaint(e), but with no success.
I am using my ListViewGuide
ListViewGuide lvg = new ListViewGuide(panelCenter);
I am realy confused why this dont work
I dont manage to execute the OnPaint method, I have tried with Invalidate() and this.SetStyle(ControlStyles.ResizeRedraw, true); But the OnPaint method doesen't get called.
class ListViewGuide : ListView
{
private System.ComponentModel.Container components = null...
Hello
I wan't to draw a line shown over a listView in a panel. Please help me, I can draw a line on the panel, but when I add the listView the line disapears (it is probobly under the listView). How do I get it to be shown in front of the listView?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.