Type | Description | |||
Color | A Color expression that indicates the color for the starting part of the bar. |
In VB.NET or C# you require the following functions until the .NET framework will provide:
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
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 VB sample defines a new bar that looks like this :
With Gantt1.Chart.Bars.Add("Task2") .Pattern = exPatternShadow .Color = RGB(0, 0, 255) .StartShape = exShapeIconCircleDot .StartColor = RGB(255, 0, 0) End With
The following C++ sample defines a bar that looks like this above:
CBar bar = m_gantt.GetChart().GetBars().Add("Task2"); bar.SetPattern( 3 /*exPatternShadow*/ ); bar.SetColor( RGB(0, 0, 255) ); bar.SetStartShape( 4 /* exShapeIconCircleDot*/ ); bar.SetStartColor( RGB(255, 0, 0) );
The following VB.NET sample defines a bar that looks like this above:
With AxGantt1.Chart.Bars.Add("Task2") .Pattern = EXGANTTLib.PatternEnum.exPatternShadow .Color = RGB(0, 0, 255) .StartShape = EXGANTTLib.ShapeCornerEnum.exShapeIconCircleDot .StartColor = RGB(255, 0, 0) End With
The following C# sample defines a bar that looks like this above:
With AxGantt1.Chart.Bars.Add("Task2") .Pattern = EXGANTTLib.PatternEnum.exPatternShadow .Color = RGB(0, 0, 255) .StartShape = EXGANTTLib.ShapeCornerEnum.exShapeIconCircleDot .StartColor = RGB(255, 0, 0) End With
The following VFP sample defines a bar that looks like this above:
with thisform.Gantt1.Chart.Bars.Add("Task2") .Pattern = 3 && exPatternShadow .Color = RGB(0, 0, 255) .StartShape = 4 && exShapeIconCircleDot .StartColor = RGB(255, 0, 0) EndWith