property Grid.BackColorHeader as Color
Specifies the header's background color.

 TypeDescription 
   Color A color expression that indicates the background color of the control's header bar. The last 7 bits in the high significant byte of the color indicates the identifier of the skin being used. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the background's part.  

Use the BackColorHeader and ForeColorHeader properties to define colors used to paint the control's header bar. Use the HeaderVisible property to show or hide the control's header. Use the HeaderHeight property to specify the height of the control's header bar. Use the LevelKey property to allow multiple levels header bar. Use the BackColorLevelHeader property to specify the background color of the header when it displays multiple levels. Use the HeaderHeight property to specify the height of the header bar.

The following VB sample changes the visual appearance for the control's header. Shortly, we need to add a skin to the Appearance object using the Add method, and we need to set the last 7 bits in the BackColorHeader property to indicates the index of the skin that we want to use. The sample applies the "" to the control' header bar:

With Grid1
    With .VisualAppearance
        .Add &H24, App.Path + "\header.ebn"
    End With
    .BackColorLevelHeader = RGB(255, 255, 255)
    .BackColorHeader = &H24000000
End With

The following C++ sample changes the visual aspect of the control' header bar:

#include "Appearance.h"
m_grid.GetVisualAppearance().Add( 0x24, COleVariant(_T("D:\\Temp\\ExGrid.Help\\header.ebn")) );
m_grid.SetBackColorHeader( 0x24000000 );

The following VB.NET sample changes the visual aspect of the control' header bar:

With AxGrid1
    With .VisualAppearance
        .Add(&H24, "D:\Temp\ExGrid.Help\header.ebn")
    End With
    .Template = "BackColorHeader = 603979776"
End With

The 603979776 value indicates the &H24000000 in hexadecimal.

The following C# sample changes the visual aspect of the control' header bar:

axGrid1.VisualAppearance.Add(0x24, "D:\\Temp\\ExGrid.Help\\header.ebn");
axGrid1.Template = "BackColorHeader = 603979776";

The 603979776 value indicates the 0x24000000 in hexadecimal.

The following VFP sample changes the visual aspect of the control' header bar:

With thisform.Grid1
    With .VisualAppearance
        .Add(36, "D:\Temp\ExGrid.Help\header.ebn")
    EndWith
    .BackColorHeader = 603979776
EndWith

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.