Type | Description | |||
Color | A Color expression that indicates the color to fill the non-working days. |
The following VB sample marks Sunday and Monday days on red:
With G2antt1.Chart .NonworkingDays = 2 ^ (EXG2ANTTLibCtl.exSunday) Or 2 ^ (EXG2ANTTLibCtl.exMonday) .NonworkingDaysColor = RGB(255, 0, 0) End With
The following C++ sample sample marks Sunday and Monday days on red:
m_g2antt.GetChart().SetNonworkingDays( 1 << ( EXG2ANTTLib::exSunday) | 1 << ( EXG2ANTTLib::exMonday ) ); m_g2antt.GetChart().SetNonworkingDaysColor( RGB(255,0,0,) );
where the #import <exg2antt.dll> must be called to insert definitions for types in the control's type library.
The following VB.NET sample marks Sunday and Monday days on red:
With AxG2antt1.Chart .NonworkingDays = 2 ^ (EXG2ANTTLib.WeekDayEnum.exSunday) Or 2 ^ (EXG2ANTTLib.WeekDayEnum.exMonday) .NonworkingDaysColor = ToUInt32(Color.Red) End With
where the ToUInt32 function converts a Color expression to a OLE_DATE expression:
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 marks Sunday and Monday days on red:
axG2antt1.Chart.NonworkingDays = 1 << (Convert.ToInt32(EXG2ANTTLib.WeekDayEnum.exSunday)) | 1 << (Convert.ToInt32(EXG2ANTTLib.WeekDayEnum.exMonday)); axG2antt1.Chart.NonworkingDaysColor = ToUInt32( Color.Red );
where the ToUInt32 function converts a Color expression to a OLE_DATE expression:
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 sample marks Sunday and Monday days on red:
with thisform.G2antt1.Chart .NonworkingDays = 2 ^ 0 + 2 ^ 1 .NonworkingDaysColor = RGB(255,0,0) endwith