![]() | 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 Gantt1.Chart
.NonworkingDays = 2 ^ (EXGANTTLibCtl.exSunday) Or 2 ^ (EXGANTTLibCtl.exMonday)
.NonworkingDaysColor = RGB(255, 0, 0)
End WithThe following C++ sample sample marks Sunday and Monday days on red:
m_gantt.GetChart().SetNonworkingDays( 1 << ( EXGANTTLib::exSunday) | 1 << ( EXGANTTLib::exMonday ) ); m_gantt.GetChart().SetNonworkingDaysColor( RGB(255,0,0,) );
where the #import <exgantt.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 AxGantt1.Chart
.NonworkingDays = 2 ^ (EXGANTTLib.WeekDayEnum.exSunday) Or 2 ^ (EXGANTTLib.WeekDayEnum.exMonday)
.NonworkingDaysColor = ToUInt32(Color.Red)
End Withwhere 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 FunctionThe following C# sample marks Sunday and Monday days on red:
axGantt1.Chart.NonworkingDays = 1 << (Convert.ToInt32(EXGANTTLib.WeekDayEnum.exSunday)) | 1 << (Convert.ToInt32(EXGANTTLib.WeekDayEnum.exMonday)); axGantt1.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.Gantt1.Chart .NonworkingDays = 2 ^ 0 + 2 ^ 1 .NonworkingDaysColor = RGB(255,0,0) endwith