Rectangle GetViewPortRect()
{
// This is the area of the control minus
// the bands headers
Rectangle rect = GetWorkRect();
if ( bands.Count > 0 )
{
// Decrease the client area by the number of headers
int top = rect.Top + 1 + BAND_HEADER_HEIGHT * (currentBandIndex + 1);
int bottom = rect.Bottom - 1 - BAND_HEADER_HEIGHT * (bands.Count - currentBandIndex - 1);
return new Rectangle(rect.Left, top, rect.Width, bottom - top);
}
return rect;
}