src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/UI/VirtualTreeControl.cs
/// <summary>
///     Helper routine to determine if the column needs to be switched to
///     correctly display the selection of an item.
/// </summary>
/// <param name="hitInfo">The hitInfo to test</param>
/// <returns>true if a column change is required to honor the selection request</returns>
Helper routine to determine if the column needs to be switched to
correctly display the selection of an item.
Helper routine to determine if the column needs to be switched to correctly display the selection of an item .
private bool RequireColumnSwitchForSelection(ref VirtualTreeHitInfo hitInfo)
        {
            var retVal = false;
            var selColumn = mySelectionColumn;
            if (hitInfo.DisplayColumn != selColumn)
            {
                if (GetStyleFlag(VTCStyleFlags.MultiSelect) && ExtendSelectionToAnchors)
                {
                    if (hitInfo.DisplayColumn == hitInfo.RawColumn)
                    {
                        retVal = true;
                    }
                    else if (!((selColumn >= hitInfo.DisplayColumn && selColumn <= hitInfo.RawColumn) ||
                               (selColumn <= hitInfo.DisplayColumn && selColumn >= hitInfo.RawColumn)))
                    {
                        retVal = true;
                    }
                }
                else
                {
                    retVal = true;
                }
            }
            return retVal;
        }
private bool RequireColumnSwitchForSelection ( ref VirtualTreeHitInfo hitInfo ) { var retVal = false ; var selColumn = mySelectionColumn ; if ( hitInfo . DisplayColumn != selColumn ) { if ( GetStyleFlag ( VTCStyleFlags . MultiSelect ) && ExtendSelectionToAnchors ) { if ( hitInfo . DisplayColumn == hitInfo . RawColumn ) { retVal = true ; } else if ( ! ( ( selColumn >= hitInfo . DisplayColumn && selColumn <= hitInfo . RawColumn ) || ( selColumn <= hitInfo . DisplayColumn && selColumn >= hitInfo . RawColumn ) ) ) { retVal = true ; } } else { retVal = true ; } } return retVal ; }
Helper routine to determine if the column needs to be switched to
correctly display the selection of an item.
Helper routine to determine if the column needs to be switched to correctly display the selection of an item .
// Single width column, must switch // The selection column is between the hit columns // Note that the only time this does not work is with a blank expansion // that has an offset anchor. However, even in this case, you have to click // on the column, or on opposite sides of the column to make the column switch, // which is still a reasonable behavior.
true if a column change is required to honor the selection request
true if a column change is required to honor the selection request
VirtualTreeHitInfo
ref
hitInfo
The hitInfo to test
The hitInfo to test