src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/UI/VirtualTreeControl.cs
/// <summary>
///     Invalidates proper region of the control when label edit state changes.
/// </summary>
Invalidates proper region of the control when label edit state changes.
Invalidates proper region of the control when label edit state changes .
private void InvalidateAreaForLabelEdit(int absRow, int column, Control labelEditControl)
        {
            var drawEditAsFocusedWindow = IsDrawWithFocusWindow(labelEditControl.Handle);
            if (!drawEditAsFocusedWindow
                && GetStyleFlag(VTCStyleFlags.MultiSelect))
            {
                var iter = CreateSelectedItemEnumerator();
                if (iter != null)
                {
                    while (iter.MoveNext())
                    {
                        InvalidateItem(
                            iter.RowInTree, MultiColumnHighlight ? -1 : iter.DisplayColumn,
                            NativeMethods.RedrawWindowFlags.Invalidate | NativeMethods.RedrawWindowFlags.Erase);
                    }
                }
            }
            InvalidateItem(
                absRow, (MultiColumnHighlight && !drawEditAsFocusedWindow) ? -1 : column,
                NativeMethods.RedrawWindowFlags.Invalidate | NativeMethods.RedrawWindowFlags.Erase);
        }
private void InvalidateAreaForLabelEdit ( int absRow , int column , Control labelEditControl ) { var drawEditAsFocusedWindow = IsDrawWithFocusWindow ( labelEditControl . Handle ) ; if ( ! drawEditAsFocusedWindow && GetStyleFlag ( VTCStyleFlags . MultiSelect ) ) { var iter = CreateSelectedItemEnumerator ( ) ; if ( iter != null ) { while ( iter . MoveNext ( ) ) { InvalidateItem ( iter . RowInTree , MultiColumnHighlight ? - 1 : iter . DisplayColumn , NativeMethods . RedrawWindowFlags . Invalidate | NativeMethods . RedrawWindowFlags . Erase ) ; } } } InvalidateItem ( absRow , ( MultiColumnHighlight && ! drawEditAsFocusedWindow ) ? - 1 : column , NativeMethods . RedrawWindowFlags . Invalidate | NativeMethods . RedrawWindowFlags . Erase ) ; }
Invalidates proper region of the control when label edit state changes.
Invalidates proper region of the control when label edit state changes .
// if we don't draw the selection as focused when the in-place edit is active // (and we don't by default), then we need to invalidate the entire selected // area, because it will need to be repainted as unfocused. // invalidate whole row if it's a multi-column highlight, otherwise just the column. // Now handle the edit row.  This may not be part of the multi-selection, so we do it even if we've executed the block above. // Invalidate the whole row if it's a multi-column highlight and focusing the edit window changes the highlight color, otherwise just invalidate the column.
absRow
int
column
int
labelEditControl
Control