src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/UI/HeaderControl.cs
/// <summary>
///     Change the width of the given column. This is a helper function to
///     facilitate the final step in updating the header. SetItemWidth does
///     not update the data in the tree control's VirtualTreeColumnHeader
///     structures.
/// </summary>
/// <param name="index">The display column</param>
/// <param name="itemWidth">The new width for the column</param>
Change the width of the given column. This is a helper function to
facilitate the final step in updating the header. SetItemWidth does
not update the data in the tree control's VirtualTreeColumnHeader
structures.
Change the width of the given column . This is a helper function to facilitate the final step in updating the header . SetItemWidth does not update the data in the tree control ' s VirtualTreeColumnHeader structures .
public void SetItemWidth(int index, int itemWidth)
        {
            index = OrderToIndex(index);
            var item = new NativeMethods.HDITEM();
            item.cxy = itemWidth;
            item.mask = NativeMethods.HDITEM.Mask.HDI_WIDTH;
            NativeMethods.SendMessage(Handle, NativeMethods.HDM_SETITEMW, index, ref item);
        }
public void SetItemWidth ( int index , int itemWidth ) { index = OrderToIndex ( index ) ; var item = new NativeMethods . HDITEM ( ) ; item . cxy = itemWidth ; item . mask = NativeMethods . HDITEM . Mask . HDI_WIDTH ; NativeMethods . SendMessage ( Handle , NativeMethods . HDM_SETITEMW , index , ref item ) ; }
Change the width of the given column.
Change the width of the given column .
// The header items can get out of sync here with drag/drop reordering. The // index requested here will always be the displayed order, not the true index, // so we need to switch to the true index before moving on.
index
int
The display column
The display column
itemWidth
int
The new width for the column
The new width for the column