Esempio n. 1
0
 private void Button1_MouseMove(object sender, MouseEventArgs e)
 {
     if (!this.resizeDragInfo.Active)
     {
         return;
     }
     ColumnPositioning.ResizeDrag(this.resizeDragInfo, e.X, 10);
     this.control.RecalculateScrollBar();
     this.control.Invalidate();
 }
Esempio n. 2
0
 protected override void OnMouseMove(MouseEventArgs e)
 {
     base.OnMouseMove(e);
     if (this.resizeDragInfo.Active)
     {
         this.Cursor = Cursors.VSplit;
         ColumnPositioning.ResizeDrag(this.resizeDragInfo, e.X, 10);
         this.RecalculateScrollBar();
         return;
     }
     int[] columnWidths = ColumnPositioning.CalculateColumnWidths(this.Columns, this.Width, 10, out _, out _);
     ColumnPositioning.HitTest(columnWidths, this.GetHScrollValue(), e.X, 5, out _, out bool resizeHandle);
     this.Cursor = resizeHandle ? Cursors.VSplit : Cursors.Default;
 }