Type | Description | |||
Color | A Color expression that indicates the color being used to highlight the selected dates. The last 7 bits in the high significant byte of the color indicates the identifier of the skin being used to display the selected dates. Use the Add method to add new skins to the control. |
The following screen shot shows the selected dates ( Dec 2 and Dec 4 ) being colored with the default format:
The following screen shot shows the selected dates ( Dec 2 and Dec 4 ) being colored with a solid color (2130771712, 0x7F00FF00):
The following screen shot shows the selected dates ( Dec 2 and Dec 4 ) being colored with this EBN file (16777216, 0x1000000):
The following screen show how a new date gets selected once the user clicks a date in the chart's header:
Your application can provide some options to help user while performing moving or resizing the bars at runtime as follow:
With G2antt1 .BeginUpdate With .Chart .FirstVisibleDate = #1/1/2008# .MarkTodayColor = .BackColor .LevelCount = 2 .MarkSelectDateColor = &H7FFDF9F4 ' The color is actually FDF9F4 as BBGGRR format .SelectLevel = 1 .SelectDate(#1/2/2008#) = True .SelectDate(#1/3/2008#) = True End With End WithThe following VB.NET sample shows how you can change the color for selected dates to be solid:
With AxG2antt1 .BeginUpdate With .Chart .FirstVisibleDate = #1/1/2008# .MarkTodayColor = .BackColor .LevelCount = 2 .MarkSelectDateColor = &H7FFDF9F4 ' The color is actually FDF9F4 as BBGGRR format .SelectLevel = 1 .SelectDate(#1/2/2008#) = True .SelectDate(#1/3/2008#) = True End With End WithThe following C++ sample shows how you can change the color for selected dates to be solid:
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate("1/1/2008"); var_Chart->PutMarkTodayColor(var_Chart->GetBackColor()); var_Chart->PutLevelCount(2); var_Chart->PutMarkSelectDateColor(0x7FFDF9F4); // The color is actually FDF9F4 as BBGGRR format var_Chart->PutSelectLevel(1); var_Chart->PutSelectDate("1/2/2008",VARIANT_TRUE); var_Chart->PutSelectDate("1/3/2008",VARIANT_TRUE);The following C# sample shows how you can change the color for selected dates to be solid:
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = "1/1/2008"; var_Chart.MarkTodayColor = var_Chart.BackColor; var_Chart.LevelCount = 2; var_Chart.MarkSelectDateColor = 0x7FFDF9F4; // The color is actually FDF9F4 as BBGGRR format var_Chart.SelectLevel = 1; var_Chart.set_SelectDate("1/2/2008",true); var_Chart.set_SelectDate("1/3/2008",true);The following VFP sample shows how you can change the color for selected dates to be solid:
with thisform.G2antt1 .BeginUpdate with .Chart .FirstVisibleDate = {^2008-1-1} .MarkTodayColor = .BackColor .LevelCount = 2 .MarkSelectDateColor = 0x7FFDF9F4; // The color is actually FDF9F4 as BBGGRR format .SelectLevel = 1 .SelectDate({^2008-1-2}) = .T. .SelectDate({^2008-1-3}) = .T. endwith endwith