Painting issue when control is uncovered from the bottom
Brought to you by:
agaman
When the bottom of the tree control is uncovered (e.g. by moving the form upwards onto the screen) the control does not paint the newly revealed region making the tree view look like it contains no rows of data (Windows 7, 64 bit).
The issue is in file TreeViewAdv.Draw.cs, function OnPaint
if (UseColumns)
{
DrawColumnHeaders(e.Graphics);
y += ColumnHeaderHeight;
if (Columns.Count == 0 || e.ClipRectangle.Height <= y)
return;
}
This code is supposed to return only when the clip region doesn't cover any of the rows. However this may not be the case if the clip region does not start with a Top == 0. The line should be:
if (Columns.Count == 0 || e.ClipRectangle.Bottom <= y)
return;