protected override void OnMouseClick(MouseEventArgs e) { base.OnMouseClick(e); if (MousePosContainsResizeBar(e)) { return; } if ((ParentRow.ChildRows.Count > 0) && IconArea.Contains(e.Location)) { // if it's within the toggle button, toggle the tree _TreeToggled(); Invalidate(); } else if (LabelArea.Contains(e.Location) || ((ParentRow.ChildRows.Count == 0) && IconArea.Contains(e.Location))) { _LabelClicked(Form.ModifierKeys); } }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); if (e.Button == MouseButtons.Left) { if (Resizing) { _HeightResized(); } Resizing = false; } if (e.Button == MouseButtons.Right) { if (LabelArea.Contains(e.Location) || ((ParentRow.ChildRows.Count == 0) && IconArea.Contains(e.Location))) { _LabelClicked(Form.ModifierKeys); } _RowContextMenuSelect(); } }