property List.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 to 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 BackColorLevelHeader property to specify the background color of the control's header bar when multiple levels are displayed. Use the LevelKey property to display the control's header bar using multiple levels. If the control displays the header bar using multiple levels the HeaderHeight property gets the height in pixels of a single level in the header bar. The control's header displays multiple levels if there are two or more neighbor columns with the same non empty level key. Use the BackColorSortBar property to specify the background color of the control's sort 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 List1
    With .VisualAppearance
        .Add &H24, App.Path + "\header.ebn"
    End With
    .BackColorHeader = &H24000000
    .ForeColorHeader = RGB(255, 255, 255)
End With

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

#include "Appearance.h"
m_list.GetVisualAppearance().Add( 0x24, COleVariant(_T("D:\\Temp\\ExList.Help\\header.ebn")) );
m_list.SetBackColorHeader( 0x24000000 );
m_list.SetForeColorHeader( RGB(255,255,255) );

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

With AxList1
    With .VisualAppearance
        .Add(&H24, "D:\Temp\ExList.Help\header.ebn")
    End With
    .Template = "BackColorHeader = 603979776"
    .ForeColorHeader = RGB(255,255,255)
End With

The 603979776 value indicates the &H24000000 in hexadecimal.

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

axList1.VisualAppearance.Add(0x24, "D:\\Temp\\ExList.Help\\header.ebn");
axList1.Template = "BackColorHeader = 603979776";
axList1.ForeColorHeader = Color.White;

The 603979776 value indicates the 0x24000000 in hexadecimal.

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

With thisform.List1
    With .VisualAppearance
        .Add(36, "D:\Temp\ExList.Help\header.ebn")
    EndWith
    .BackColorHeader = 603979776
	.ForeColorHeader = RGB(255,255,255)
EndWith

 


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