public void Render(PaintEventArgs e,int rowHeight,int yOffset)
{
e.Graphics.FillRectangle(headerBrush,offX,offY,tableWidth-1,headerHeight+rowSpace*2);
int startX=0;
for(int i=0;i<list.Count;i++)
{
CustomListColumn col = list[i] as CustomListColumn;
if(col==overCol)
e.Graphics.FillRectangle(Brushes.LightBlue,col.Left,offY,col.Width,headerHeight+rowSpace*2);
//vertical lines
e.Graphics.DrawLine(Pens.Black,col.Width+startX-colSpace+offX,offY,col.Width+startX-colSpace+offX,HeaderHeight+rowHeight+yOffset);
e.Graphics.DrawString(col.Title,Font,foreBrush,new RectangleF(startX+offX,offY,startX+col.Width,Font.Height));//locs[i],0);
//e.Graphics.DrawLine(Pens.Red,col.Left+col.Width,HeaderHeight+rowHeight+yOffset,col.Left+col.Width,Height);
startX+=col.Width;
}
e.Graphics.DrawLine(Pens.Black,offX,offY+headerHeight+rowSpace*2,tableWidth-1,offY+headerHeight+rowSpace*2);
switch(bStyle)
{
case BorderStyle.Fixed3D:
System.Windows.Forms.ControlPaint.DrawBorder3D(e.Graphics,0,0,Width,Height,border);
break;
case BorderStyle.FixedSingle:
System.Windows.Forms.ControlPaint.DrawBorder(e.Graphics,new Rectangle(0,0,Width,Height),Color.Black,ButtonBorderStyle.Solid);
break;
}
}