What's the reason for this?
I override OnPaintBackground and draw a string. It doesn't show up until I call this in the constructor:
this.SetStyle ( ControlStyles.UserPaint, true );
But then I don't see the items in the listview.
Why and how to solve this?
EDIT: code
protected override void OnPaintBackground ( PaintEventArgs pevent )
{
base.OnPaintBackground ( pevent );
// Create string to draw.
String drawString = "76";
// Create font and brush.
Font drawFont = new Font ( "Arial", 36 );
SolidBrush drawBrush = new SolidBrush ( Color.Blue );
// Create point for upper-left corner of drawing.
PointF drawPoint = new PointF ( 150.0F, 150.0F );
// Draw string to screen.
pevent.Graphics.DrawString ( drawString, drawFont, drawBrush, drawPoint );
//pevent.Graphics.FillRectangle ( drawBrush, this.ClientRectangle );
}`enter code here`