property Chart.ForeColorLevelHeader as Color
Specifies the foreground color for the chart's levels.

 TypeDescription 
   Color A Color expression that indicates the background color for the chart's header.  
Use the ForeColorLevelHeader property to specify the foreground color of the chart's header. Use the BackColorLevelHeader property to specify the background color of the chart's header. Use the LevelCount property to specify the number of levels in the chart's header. Use the Level property to access a level. Use the BackColor property to specify the background color for a specified level. Use the ForeColor property to specify the foreground color for a specified level. Use the BackColor property to specify the chart's background color. Use the ForeColor property to specify the chart's foreground color. Use the ItemBackColor property to change the item's background color. Use the NonworkingDaysColor property the color of the brush to fill the nonworking days area. Use the Picture property to specify the picture being displayed on the chart's area.

The following VB sample changes the chart's header foreground color:

With Gantt1.Chart
    .ForeColorLevelHeader = RGB(&H80, &H80, &H80)
End With

The following C++ sample changes the chart's header foreground color:

m_gantt.GetChart().SetForeColorLevelHeader( RGB(0x80,0x80,0x80) );

The following VB.NET sample changes the chart's header foreground color:

With AxGantt1.Chart
    .ForeColorLevelHeader = ToUInt32(Color.FromArgb(&H80, &H80, &H80))
End With

where the ToUInt32 function converts a Color expression to an OLE_COLOR type:

Shared Function ToUInt32(ByVal c As Color) As UInt32
    Dim i As Long
    i = c.R
    i = i + 256 * c.G
    i = i + 256 * 256 * c.B
    ToUInt32 = Convert.ToUInt32(i)
End Function

The following C# sample changes the chart's header foreground color:

axGantt1.Chart.ForeColorLevelHeader = ToUInt32(Color.FromArgb(0x80, 0x80, 0x80));

where the ToUInt32 function converts a Color expression to an OLE_COLOR type:

private UInt32 ToUInt32(Color c)
{
	long i;
	i = c.R;
	i = i + 256 * c.G;
	i = i + 256 * 256 * c.B;
	return Convert.ToUInt32(i);
}

The following VFP sample changes the chart's header foreground color:

With thisform.Gantt1.Chart
    .ForeColorLevelHeader = RGB(128, 128, 128)
EndWith
 


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