protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
Graphics g = pe.Graphics;
// Manipulate child window in case there is one
if ( currentBandIndex == -1 && bands.Count > 0)
SetCurrentBand(0);
// Background if it needs to be painted
DrawBackground(g);
// If we have a border
DrawBorder(g);
// The little headers
DrawHeaders(g);
// If there is a child window
// it will paint itself, otherwise we do the painting
if ( !HasChild() )
{
// The items themselves
DrawItems(g, Rectangle.Empty, null);
// The buttons for scrolling items
// Drawing second so that they don't get written over by the items
DrawArrowButtons(g);
}
// Highlight last item clicked
if ( forceHightlight )
{
ForceHighlightItem(g, forceHightlightIndex);
forceHightlight = false;
}
}