protected override void HandleHitTest(Graphics g, OlvListViewHitTestInfo hti, int x, int y)
{
Branch br = this.Branch;
Rectangle r = this.Bounds;
if (br.CanExpand) {
r.Offset((br.Level - 1) * PIXELS_PER_LEVEL, 0);
r.Width = PIXELS_PER_LEVEL;
if (r.Contains(x, y)) {
hti.HitTestLocation = HitTestLocation.ExpandButton;
return;
}
}
r = this.Bounds;
int indent = br.Level * PIXELS_PER_LEVEL;
r.X += indent;
r.Width -= indent;
// Ignore events in the indent zone
if (x < r.Left) {
hti.HitTestLocation = HitTestLocation.Nothing;
} else {
this.StandardHitTest(g, hti, r, x, y);
}
}