Rendering issues with ExpandingIcon column with UseColumns.
Brought to you by:
agaman
Adding an ExpandingIcon NodeControl to an TreeViewAdv with the TreeViewAdv.UseColumns property set to true causes a rendering issue when rendering the ExpandingIcon. The ExpandingIcon jumps from where it's supposed to render on the Y axis to the parent row.
Logged In: YES
user_id=1044870
Originator: NO
The fix: In TreeViewAdv.cs, method DrawIcons, change the following code:
foreach (NodeControlInfo info in GetNodeControls(_expandingNodes[i]))
if (info.Control is ExpandingIcon)
{
Rectangle rect = info.Bounds;
rect.X -= OffsetX;
rect.Y -= firstRowY;
context.Bounds = rect;
info.Control.Draw(info.Node, context);
}
to
foreach (NodeControlInfo info in GetNodeControls(_expandingNodes[i]))
if (info.Control is ExpandingIcon)
{
Rectangle rect = info.Bounds;
rect.X -= OffsetX;
rect.Y -= firstRowY;
// adjust when using columns
if (UseColumns)
rect.Y += ColumnHeaderHeight;
context.Bounds = rect;
info.Control.Draw(info.Node, context);
}