src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/UI/ColumnHeader.cs
/// <summary>
///     Get the left and width for the expanded column. Numbers returned
///     here are based solely on the header information, they do not account
///     for the horizontal scrollbar position or the vertical scrollbar visibility.
/// </summary>
/// <param name="controlWidth">The current width of the control.</param>
/// <param name="leftColumn">The leftmost column</param>
/// <param name="rightColumn">The rightmost column</param>
/// <param name="itemLeft">The left edge of this column</param>
/// <param name="itemWidth">The width of this column</param>
Get the left and width for the expanded column. Numbers returned
here are based solely on the header information, they do not account
for the horizontal scrollbar position or the vertical scrollbar visibility.
Get the left and width for the expanded column . Numbers returned here are based solely on the header information they do not account for the horizontal scrollbar position or the vertical scrollbar visibility .
public void GetColumnBounds(int controlWidth, int leftColumn, int rightColumn, out int itemLeft, out int itemWidth)
            {
                var leftTotal = 0;
                var widthTotal = 0;
                if (myVariableBounds != null)
                {
                    float floatLeft;
                    float floatRight;
                    GetVariableColumnBounds(controlWidth, leftColumn, rightColumn, out floatLeft, out floatRight);
                    if (leftColumn > 0)
                    {
                        leftTotal = (int)(floatLeft + .5f);
                    }
                    widthTotal = (int)(floatRight + .5f) - leftTotal;
                }
                else
                {
                    for (var i = 0; i < leftColumn; ++i)
                    {
                        leftTotal += myHeaders[i].Width;
                    }
                    for (var i = leftColumn; i <= rightColumn; ++i)
                    {
                        widthTotal += myHeaders[i].Width;
                    }
                }
                itemLeft = leftTotal;
                itemWidth = widthTotal;
            }
public void GetColumnBounds ( int controlWidth , int leftColumn , int rightColumn , out int itemLeft , out int itemWidth ) { var leftTotal = 0 ; var widthTotal = 0 ; if ( myVariableBounds != null ) { float floatLeft ; float floatRight ; GetVariableColumnBounds ( controlWidth , leftColumn , rightColumn , out floatLeft , out floatRight ) ; if ( leftColumn > 0 ) { leftTotal = ( int ) ( floatLeft + .5f ) ; } widthTotal = ( int ) ( floatRight + .5f ) - leftTotal ; } else { for ( var i = 0 ; i < leftColumn ; ++ i ) { leftTotal += myHeaders [ i ] . Width ; } for ( var i = leftColumn ; i <= rightColumn ; ++ i ) { widthTotal += myHeaders [ i ] . Width ; } } itemLeft = leftTotal ; itemWidth = widthTotal ; }
Get the left and width for the expanded column.
Get the left and width for the expanded column .
controlWidth
int
The current width of the control.
The current width of the control .
leftColumn
int
The leftmost column
The leftmost column
rightColumn
int
The rightmost column
The rightmost column
int
out
itemLeft
The left edge of this column
The left edge of this column
itemWidth
The width of this column
The width of this column