public void OnMouseDown(Point point) { if (point.Y > RowHeight + Padding.Vertical) { Point rowRelativePoint; CustomListRow row = SelectChild(point, out rowRelativePoint); if (row == null) { ParentPanel.ClearSelection(); return; } row.OnMouseDown(rowRelativePoint); } else { if (!Selectable) { return; } ParentPanel.ClearSelection(); Selected = true; ParentPanel.SelectedRow = this; ParentPanel.Invalidate(); } }
protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); if (level1ColWidths == null) level1ColWidths = level1Widths(); Point rowRelativePoint; CustomListRow selectedRow = getRowFromPoint(e.Location, out rowRelativePoint); if (selectedRow == null) return; selectedRow.OnMouseDown(rowRelativePoint); }