src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/UI/ColumnHeader.cs
/// <summary>
///     Update the appearance fields of a column header. Does not affect the width or order of the header
/// </summary>
/// <param name="column">
///     The column to update. This is the native column value, which may not be the same as
///     the displayed column position, depending on the current ColumnPermutation.
/// </param>
/// <param name="headerText">The string to display in the header</param>
/// <param name="style">The style to use</param>
/// <param name="imageIndex">The index in the HeaderImageList property, or -1 for no image</param>
Update the appearance fields of a column header. Does not affect the width or order of the header
Update the appearance fields of a column header . Does not affect the width or order of the header
public void UpdateColumnHeaderAppearance(int column, string headerText, VirtualTreeColumnHeaderStyles style, int imageIndex)
        {
            if (myFullHeaders != null)
            {
                myFullHeaders[column].SetAppearanceFields(headerText, style, imageIndex);
                if (ReferenceEquals(myHeaderBounds.Headers, myFullHeaders))
                {
                    if (myHeaderContainer != null)
                    {
                        myHeaderContainer.HeaderControl.UpdateItemAppearance(myFullHeaders[column], column);
                    }
                }
                else
                {
                    var displayColumn = column;
                    if (myColumnPermutation != null)
                    {
                        displayColumn = myColumnPermutation.GetPermutedColumn(column);
                        if (displayColumn == -1)
                        {
                            return;
                        }
                    }
                    myHeaderBounds.Headers[displayColumn].SetAppearanceFields(headerText, style, imageIndex);
                    if (myHeaderContainer != null)
                    {
                        myHeaderContainer.HeaderControl.UpdateItemAppearance(myHeaderBounds.Headers[displayColumn], displayColumn);
                    }
                }
            }
        }
public void UpdateColumnHeaderAppearance ( int column , string headerText , VirtualTreeColumnHeaderStyles style , int imageIndex ) { if ( myFullHeaders != null ) { myFullHeaders [ column ] . SetAppearanceFields ( headerText , style , imageIndex ) ; if ( ReferenceEquals ( myHeaderBounds . Headers , myFullHeaders ) ) { if ( myHeaderContainer != null ) { myHeaderContainer . HeaderControl . UpdateItemAppearance ( myFullHeaders [ column ] , column ) ; } } else { var displayColumn = column ; if ( myColumnPermutation != null ) { displayColumn = myColumnPermutation . GetPermutedColumn ( column ) ; if ( displayColumn == - 1 ) { return ; } } myHeaderBounds . Headers [ displayColumn ] . SetAppearanceFields ( headerText , style , imageIndex ) ; if ( myHeaderContainer != null ) { myHeaderContainer . HeaderControl . UpdateItemAppearance ( myHeaderBounds . Headers [ displayColumn ] , displayColumn ) ; } } } }
Update the appearance fields of a column header.
Update the appearance fields of a column header .
column
int
The column to update. This is the native column value, which may not be the same as
the displayed column position, depending on the current ColumnPermutation.
The column to update . This is the native column value which may not be the same as the displayed column position depending on the current ColumnPermutation .
headerText
string
The string to display in the header
The string to display in the header
style
VirtualTreeColumnHeaderStyles
The style to use
The style to use
imageIndex
int
The index in the HeaderImageList property, or -1 for no image
The index in the HeaderImageList property or - 1 for no image