src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/UI/ColumnHeader.cs
/// <summary>
///     Start tracking a column. Used by the header control.
/// </summary>
/// <param name="displayColumn">The column being adjusted</param>
/// <param name="mousePosition">The current position of the mouse, in screen coordinates</param>
/// <returns>True if tracking is enabled for this column</returns>
Start tracking a column. Used by the header control.
Start tracking a column . Used by the header control .
internal bool BeginTrackingSplitter(int displayColumn, Point mousePosition)
        {
            if (!myHeaderBounds.AllowColumnAdjustment(displayColumn))
            {
                return false;
            }
            var x = mousePosition.X;
            var splitPoint = PointToClient(new Point(x, 0));
            var itemRect = new Rectangle(0, 0, 0, 0);
            LimitRectToColumn(displayColumn, ref itemRect, false, -1, true);
            var scrollShift = -myXPos;
            if (scrollShift != 0)
            {
                itemRect.Offset(scrollShift, 0);
            }
            var splitterTop = -splitPoint.Y; 
            var itemLeft = itemRect.Left + x - splitPoint.X;
            mySplitData.Start(
                splitterTop,
                splitterTop + ClientSize.Height, 
                itemRect.Right + x - splitPoint.X,
                itemLeft);
            myHeaderBounds.BeginColumnAdjustment(displayColumn, itemLeft, itemRect.Right - splitPoint.X);
            return true;
        }
internal bool BeginTrackingSplitter ( int displayColumn , Point mousePosition ) { if ( ! myHeaderBounds . AllowColumnAdjustment ( displayColumn ) ) { return false ; } var x = mousePosition . X ; var splitPoint = PointToClient ( new Point ( x , 0 ) ) ; var itemRect = new Rectangle ( 0 , 0 , 0 , 0 ) ; LimitRectToColumn ( displayColumn , ref itemRect , false , - 1 , true ) ; var scrollShift = - myXPos ; if ( scrollShift != 0 ) { itemRect . Offset ( scrollShift , 0 ) ; } var splitterTop = - splitPoint . Y ; var itemLeft = itemRect . Left + x - splitPoint . X ; mySplitData . Start ( splitterTop , splitterTop + ClientSize . Height , itemRect . Right + x - splitPoint . X , itemLeft ) ; myHeaderBounds . BeginColumnAdjustment ( displayColumn , itemLeft , itemRect . Right - splitPoint . X ) ; return true ; }
Start tracking a column.
Start tracking a column .
// This will give us the backwards shift for the y position, handle with one call // -HeaderHeight; //Height - 2 * BorderOffset,
True if tracking is enabled for this column
True if tracking is enabled for this column
displayColumn
int
The column being adjusted
The column being adjusted
mousePosition
Point
The current position of the mouse, in screen coordinates
The current position of the mouse in screen coordinates