Type | Description | |||
Pos as ScrollRangeEnum | A ScrollrangeEnum expression that indicates whether the starting or ending position of the range is beging requested or changed. | |||
Variant | A Variant expression that indicates the date or the time when the range beings or ends. |
The following VB sample disables the left and right scroll bar buttons, and specifies a range of date to scroll within:
With Gantt1 .Columns.Add "Task" With .Chart .LevelCount = 2 .PaneWidth(0) = 56 .ScrollRange(exStartDate) = "1/1/2001" .ScrollRange(exEndDate) = "1/31/2001" .FirstVisibleDate = "1/12/2001" End With With .Items h = .AddItem("Task 1") .AddBar h,"Task","1/15/2001","1/18/2001","K1" h = .AddItem("Task 1") .AddBar h,"Task","1/5/2001","1/11/2001","K1" End With End With
The following VB.NET sample disables the left and right scroll bar buttons, and specifies a range of date to scroll within:
Dim h With AxGantt1 .Columns.Add "Task" With .Chart .LevelCount = 2 .PaneWidth(0) = 56 .ScrollRange(EXGANTTLib.ScrollRangeEnum.exStartDate) = "1/1/2001" .ScrollRange(EXGANTTLib.ScrollRangeEnum.exEndDate) = "1/31/2001" .FirstVisibleDate = "1/12/2001" End With With .Items h = .AddItem("Task 1") .AddBar h,"Task","1/15/2001","1/18/2001","K1" h = .AddItem("Task 1") .AddBar h,"Task","1/5/2001","1/11/2001","K1" End With End With
The following C# sample disables the left and right scroll bar buttons, and specifies a range of date to scroll within:
axGantt1.Columns.Add("Task"); EXGANTTLib.Chart var_Chart = axGantt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(0 != 0,56); var_Chart.set_ScrollRange(EXGANTTLib.ScrollRangeEnum.exStartDate,"1/1/2001"); var_Chart.set_ScrollRange(EXGANTTLib.ScrollRangeEnum.exEndDate,"1/31/2001"); var_Chart.FirstVisibleDate = "1/12/2001"; EXGANTTLib.Items var_Items = axGantt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task","1/15/2001","1/18/2001","K1",null); h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task","1/5/2001","1/11/2001","K1",null);
The following C++ sample disables the left and right scroll bar buttons, and specifies a range of date to scroll within:
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library' #import "D:\\Exontrol\\ExGantt\\project\\DemoU\\ExGantt.dll" using namespace EXGANTTLib; */ EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown(); spGantt1->GetColumns()->Add(L"Task"); EXGANTTLib::IChartPtr var_Chart = spGantt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(0,56); var_Chart->PutScrollRange(EXGANTTLib::exStartDate,"1/1/2001"); var_Chart->PutScrollRange(EXGANTTLib::exEndDate,"1/31/2001"); var_Chart->PutFirstVisibleDate("1/12/2001"); EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task","1/15/2001","1/18/2001","K1",vtMissing); h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task","1/5/2001","1/11/2001","K1",vtMissing);
The following VFP sample disables the left and right scroll bar buttons, and specifies a range of date to scroll within:
with thisform.Gantt1 .Columns.Add("Task") with .Chart .LevelCount = 2 .PaneWidth(0) = 56 .ScrollRange(0) = "1/1/2001" .ScrollRange(1) = "1/31/2001" .FirstVisibleDate = "1/12/2001" endwith with .Items h = .AddItem("Task 1") .AddBar(h,"Task","1/15/2001","1/18/2001","K1") h = .AddItem("Task 1") .AddBar(h,"Task","1/5/2001","1/11/2001","K1") endwith endwith