Menu

#30 Painting issue when control is uncovered from the bottom

open
nobody
None
5
2010-04-16
2010-04-16
Anonymous
No

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;

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.