Пример #1
0
        public void OnMouseDoubleClick(MouseEventArgs e, Point point)
        {
            if (e.Button == MouseButtons.Left)
            {
                if (DefaultMenuItem != null)
                {
                    DefaultMenuItem.PerformClick();
                }
            }

            if (point.Y > RowHeight + Padding.Vertical)
            {
                Point         rowRelativePoint;
                CustomListRow row = SelectChild(point, out rowRelativePoint);
                if (row == null)
                {
                    return;
                }

                row.OnMouseDoubleClick(e, rowRelativePoint);
            }
            else
            {
                Point          itemRelativePoint;
                CustomListItem item = GetItemFromPosition(point, out itemRelativePoint);
                if (item == null)
                {
                    return;
                }

                item.OnMouseDoubleClick(e, itemRelativePoint);
            }
        }
Пример #2
0
        protected override void OnMouseDoubleClick(MouseEventArgs e)
        {
            base.OnMouseDoubleClick(e);
            if (level1ColWidths == null)
                level1ColWidths = level1Widths();

            Point rowRelativePoint;
            CustomListRow selectedRow = getRowFromPoint(e.Location, out rowRelativePoint);
            if (selectedRow == null)
                return;

            selectedRow.OnMouseDoubleClick(e, rowRelativePoint);
        }