src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/UI/ColumnSelection.cs
/// <summary>
///     Determine the display column and native column for the current selection
///     column and the specified caret. If extending anchor columns is enabled,
///     the the returned displayColumn may not be the current selection column.
/// </summary>
/// <param name="caret">The caret to test. Should not be -1.</param>
/// <param name="displayColumn">Returns the display column</param>
/// <param name="nativeColumn">Returns the native column</param>
Determine the display column and native column for the current selection
column and the specified caret. If extending anchor columns is enabled,
the the returned displayColumn may not be the current selection column.
Determine the display column and native column for the current selection column and the specified caret . If extending anchor columns is enabled the the returned displayColumn may not be the current selection column .
private void ResolveSelectionColumn(int caret, out int displayColumn, out int nativeColumn)
        {
            var resolvedDisplayColumn = mySelectionColumn;
            displayColumn = resolvedDisplayColumn;
            if (GetStyleFlag(VTCStyleFlags.MultiSelect) && ExtendSelectionToAnchors)
            {
                if (caret >= 0
                    && caret < myTree.VisibleItemCount)
                {
                    var expansion = myTree.GetBlankExpansion(caret, resolvedDisplayColumn, myColumnPermutation);
                    if (expansion.AnchorColumn != resolvedDisplayColumn
                        && expansion.AnchorColumn != VirtualTreeConstant.NullIndex)
                    {
                        displayColumn = resolvedDisplayColumn = expansion.AnchorColumn;
                    }
                }
            }
            nativeColumn = (myColumnPermutation != null)
                               ? myColumnPermutation.GetNativeColumn(resolvedDisplayColumn)
                               : resolvedDisplayColumn;
        }
private void ResolveSelectionColumn ( int caret , out int displayColumn , out int nativeColumn ) { var resolvedDisplayColumn = mySelectionColumn ; displayColumn = resolvedDisplayColumn ; if ( GetStyleFlag ( VTCStyleFlags . MultiSelect ) && ExtendSelectionToAnchors ) { if ( caret >= 0 && caret < myTree . VisibleItemCount ) { var expansion = myTree . GetBlankExpansion ( caret , resolvedDisplayColumn , myColumnPermutation ) ; if ( expansion . AnchorColumn != resolvedDisplayColumn && expansion . AnchorColumn != VirtualTreeConstant . NullIndex ) { displayColumn = resolvedDisplayColumn = expansion . AnchorColumn ; } } } nativeColumn = ( myColumnPermutation != null ) ? myColumnPermutation . GetNativeColumn ( resolvedDisplayColumn ) : resolvedDisplayColumn ; }
Determine the display column and native column for the current selection
column and the specified caret.
Determine the display column and native column for the current selection column and the specified caret .
// We can be on a blank in this case, make sure we aren't
caret
int
The caret to test. Should not be -1.
The caret to test . Should not be - 1 .
int
out
displayColumn
Returns the display column
Returns the display column
nativeColumn
Returns the native column
Returns the native column