Exemplo n.º 1
0
        protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
        {
            base.OnMouseDown(e);
            this.Data.Owner.EndEdit();

            if (IsInResizeLocation(e.Location))
            {
                this.CallDoMouseUp(e);
                if (e.X <= this.ControlBoundingRectangle.X + resizePointerOffset)
                {
                    int index = this.Parent.Children.IndexOf(this);
                    if (index > 0)
                    {
                        DetailListViewHeaderCellElement previousCell = this.Parent.Children[index - 1] as DetailListViewHeaderCellElement;
                        if (previousCell != null)
                        {
                            previousCell.BeginResize(e.Location);
                        }
                    }
                }
                else
                {
                    this.BeginResize(e.Location);
                }
            }
            else if (e.Button == MouseButtons.Left)
            {
                BeginDragDrop();
            }
        }