property Gantt.Background(Part as BackgroundPartEnum) as Color
Returns or sets a value that indicates the background color for parts in the control.

 TypeDescription 
   Part as BackgroundPartEnum A BackgroundPartEnum expression that indicates a part in the control.  
   Color A Color expression that indicates the background color for a specified part. 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.  
The Background property specifies a background color or a visual appearance for specific parts in the control. If the Background property is 0, the control draws the part as default. Use the Add method to add new skins to the control. Use the Remove method to remove a specific skin from the control. Use the Clear method to remove all skins in the control. Use the BeginUpdate and EndUpdate methods to maintain performance while init the control. Use the Refresh method to refresh the control.

The following VB sample changes the visual appearance for the "drop down" filter button. The sample applies the skin "" to the "drop down" filter buttons:

With Gantt1
    With .VisualAppearance
        .Add &H1, App.Path + "\fbardd.ebn"
    End With
    .Background(exHeaderFilterBarButton) = &H1000000
End With

The following C++ sample changes the visual appearance for the "drop down" filter button:

#include "Appearance.h"
m_gantt.GetVisualAppearance().Add( 0x01, COleVariant(_T("D:\\Temp\\ExGantt.Help\\fbardd.ebn")) );
m_gantt.SetBackground( 0 /*exHeaderFilterBarButton*/, 0x1000000 );

The following VB.NET sample changes the visual appearance for the "drop down" filter button:

With AxGantt1
    With .VisualAppearance
        .Add(&H1, "D:\Temp\ExGantt.Help\fbardd.ebn")
    End With
    .set_Background(EXGANTTLib.BackgroundPartEnum.exHeaderFilterBarButton, &H1000000)
End With

The following C# sample changes the visual appearance for the "drop down" filter button:

axGantt1.VisualAppearance.Add(0x1, "D:\\Temp\\ExGantt.Help\\fbardd.ebn");
axGantt1.set_Background(EXGANTTLib.BackgroundPartEnum.exHeaderFilterBarButton, 0x1000000);

The following VFP sample changes the visual appearance for the "drop down" filter button:

With thisform.Gantt1
    With .VisualAppearance
        .Add(1, "D:\Temp\ExGantt.Help\fbardd.ebn")
    EndWith
    .Object.Background(0) = 16777216
EndWith

The 16777216 value is the 0x1000000 value in hexadecimal.


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