50 |
How do I get the start/end of the bar once the BarResize/BarResizing event occurs
' HostEvent event - Notifies the application once the host fires an event. Private Sub Exg2host1_HostEvent(ByVal sender As System.Object,ByVal EventID As exontrol.EXG2HOSTLib.HostEventEnum) Handles Exg2host1.HostEvent Dim h,key With Exg2host1 h = .get_HostEventParam(0) key = .get_HostEventParam(1) Debug.Print( .get_HostEventParam(-2) ) Debug.Print( "Start:" ) Debug.Print( .Host.Items.get_ItemBar(h,key,1) ) Debug.Print( .get_HostEventParam(-2) ) Debug.Print( "End:" ) Debug.Print( .Host.Items.get_ItemBar(h,key,2) ) End With End Sub With Exg2host1 With .Host.Chart .set_PaneWidth(False,128) .FirstVisibleDate = #3/30/2019# End With With .Host.Items .AddBar(.AddItem("Task"),"Task",#4/1/2019#,#4/14/2019#) End With End With |
49 |
How do I get the bar/task from the cursor
' HostEvent event - Notifies the application once the host fires an event. Private Sub Exg2host1_HostEvent(ByVal sender As System.Object,ByVal EventID As exontrol.EXG2HOSTLib.HostEventEnum) Handles Exg2host1.HostEvent Dim b,c,h,i With Exg2host1 Debug.Print( "Event:" ) Debug.Print( .get_HostEventParam(-2) ) With .Host i = .get_ItemFromPoint(-1,-1,c,h) Debug.Print( "Cell:" ) Debug.Print( .Items.get_CellCaption(i,c) ) With .Chart b = .get_BarFromPoint(-1,1) Debug.Print( "Bar:" ) Debug.Print( Exg2host1.Host.Items.get_ItemBar(i,b,0) ) End With End With End With End Sub |
48 |
How do I get the cell from the cursor
' HostEvent event - Notifies the application once the host fires an event. Private Sub Exg2host1_HostEvent(ByVal sender As System.Object,ByVal EventID As exontrol.EXG2HOSTLib.HostEventEnum) Handles Exg2host1.HostEvent Dim c,h,i With Exg2host1 Debug.Print( "Event:" ) Debug.Print( .get_HostEventParam(-2) ) With .Host i = .get_ItemFromPoint(-1,-1,c,h) Debug.Print( "Cell:" ) Debug.Print( .Items.get_CellCaption(i,c) ) End With End With End Sub |
47 |
How can I highlights cells based on its value
With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName") With .Host .BeginUpdate() .BackColorAlternate = Color.FromArgb(0,0,0) With .Columns.Item("Title") .set_Def(4,15790320) .Width = .AutoWidth End With With .ConditionalFormats .Add("lower(%4) contains `manager`").Bold = True .Add("%3").BackColor = Color.FromArgb(240,240,240) End With .Items.set_ExpandItem(0,True) With .Columns.Item("EmployeeID") .Width = .AutoWidth End With .EndUpdate() End With End With |
46 |
How do I programatically hide a column
|
45 |
Is it possible to get the information from the control when we click on the bar/item
' HostEvent event - Notifies the application once the host fires an event. Private Sub Exg2host1_HostEvent(ByVal sender As System.Object,ByVal EventID As exontrol.EXG2HOSTLib.HostEventEnum) Handles Exg2host1.HostEvent Dim b,c,hit,i With Exg2host1 Debug.Print( .get_HostEventParam(-2) ) With .Host i = .get_ItemFromPoint(-1,-1,c,hit) Debug.Print( "cell's value from cursor: " ) Debug.Print( .Items.get_CellValue(i,c) ) Debug.Print( "cell's value on col 1: " ) Debug.Print( .Items.get_CellValue(i,1) ) b = .Chart.get_BarFromPoint(-1,-1) Debug.Print( "Bar:" ) Debug.Print( b ) Debug.Print( "Bar Start:" ) Debug.Print( .Items.get_ItemBar(i,b,1) ) Debug.Print( "Bar End:" ) Debug.Print( .Items.get_ItemBar(i,b,2) ) Debug.Print( "Bar Caption:" ) Debug.Print( .Items.get_ItemBar(i,b,3) ) End With End With End Sub With Exg2host1 With .Host .Debug = True With .Chart.Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With End With .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName") .Host.Items.set_ExpandItem(0,True) With .Host.Chart .set_PaneWidth(False,128) .ScrollTo(#5/27/2017#,1) End With End With |
44 |
How do I get the bar from the cursor
' HostEvent event - Notifies the application once the host fires an event. Private Sub Exg2host1_HostEvent(ByVal sender As System.Object,ByVal EventID As exontrol.EXG2HOSTLib.HostEventEnum) Handles Exg2host1.HostEvent With Exg2host1 Debug.Print( .get_HostEventParam(-2) ) Debug.Print( .Host.Chart.get_BarFromPoint(-1,-1) ) End With End Sub With Exg2host1 With .Host .VisualAppearance.Add(1,"C:\Program Files\Exontrol\ExG2Host\Sample\EBN\Assorted\wbs-ass.ebn") With .Chart.Bars.Item("Task") .Height = 15 .Color32 = &H1ff0000 .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With End With .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName") .Host.Items.set_ExpandItem(0,True) With .Host.Chart .set_PaneWidth(False,128) .ScrollTo(#5/27/2017#,1) End With End With |
43 |
How do I add Start/End columns
' HostEvent event - Notifies the application once the host fires an event. Private Sub Exg2host1_HostEvent(ByVal sender As System.Object,ByVal EventID As exontrol.EXG2HOSTLib.HostEventEnum) Handles Exg2host1.HostEvent With Exg2host1 Debug.Print( .get_HostEventParam(-2) ) End With End Sub With Exg2host1 .HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostReadWrite Or exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddEmptyItem With .Host .SingleSel = False .OnResizeControl = 1 .ScrollBars = exontrol.EXG2ANTTLib.ScrollBarsEnum.exVScrollEmptySpace Or exontrol.EXG2ANTTLib.ScrollBarsEnum.exDisableNoVertical With .Columns.Add("Start") .AllowSizing = False .set_Def(18,1) .Editor.EditType = 7 End With With .Columns.Add("End") .AllowSizing = False .set_Def(18,2) .Editor.EditType = 7 End With .Items.AllowCellValueToItemBar = True With .Chart .AllowCreateBar = 1 .set_PaneWidth(False,256) .Bars.Item("Task").OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack End With End With End With |
42 |
How do I hide the left/items/columns part of the control
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 With .Host.Chart.Bars.Item("Task") .Pattern = 1 .Color = Color.FromArgb(0,0,255) .set_Def(19,50) End With .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName") .Host.Items.set_ExpandItem(0,True) .HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostReadWrite Or exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddEmptyItem With .Host .OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter Or exontrol.EXG2ANTTLib.OnResizeControlEnum.exResizeChart With .Chart .ColumnsFormatLevel = "1" .set_PaneWidth(False,0) .ScrollTo(#5/27/2017#,1) End With End With End With |
41 |
How do I hide the right/chart/tasks part of the control
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 With .Host.Chart.Bars.Item("Task") .Pattern = 1 .Color = Color.FromArgb(0,0,255) .set_Def(19,50) End With .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName") .Host.Items.set_ExpandItem(0,True) With .Host With .Chart .set_PaneWidth(True,0) .OverviewVisible = 0 End With End With End With |
40 |
How do hide the top/overview part of the control
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,.get_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource)) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate") With .Host With .Chart .OverviewVisible = 0 .set_PaneWidth(False,256) .ScrollTo(#4/27/1969#,1) End With End With End With |
39 |
How do I resize the panels
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 With .Host .VisualAppearance.Add(1,"C:\Program Files\Exontrol\ExG2Host\Sample\EBN\Assorted\wbs-ass.ebn") With .Chart.Bars.Item("Task") .Height = 15 .Color32 = &H1ff0000 .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With End With .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName") .Host.Items.set_ExpandItem(0,True) With .Host.Chart .set_PaneWidth(False,128) .ScrollTo(#5/27/2017#,1) End With End With |
38 |
How do I lock the first column
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") With .Host .CountLockedColumns = 1 .BackColorLock = .BackColorAlternate End With End With |
37 |
How do I specify a different color for the tasks ( EBN color )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 With .Host .VisualAppearance.Add(1,"C:\Program Files\Exontrol\ExG2Host\Sample\EBN\Assorted\wbs-ass.ebn") With .Chart.Bars.Item("Task") .Height = 15 .Color32 = &H1ff0000 .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With End With .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName") .Host.Items.set_ExpandItem(0,True) .Host.Chart.set_PaneWidth(False,256) .Host.Chart.ScrollTo(#5/27/2017#,1) End With |
36 |
How do I specify a different color for the tasks ( solid color, transparent )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 With .Host.Chart.Bars.Item("Task") .Pattern = 1 .Color = Color.FromArgb(0,0,255) .set_Def(19,50) End With .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName") .Host.Items.set_ExpandItem(0,True) .Host.Chart.set_PaneWidth(False,256) .Host.Chart.ScrollTo(#5/27/2017#,1) End With |
35 |
GroupBy
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataSource("Links",.get_DataSource("Items")) .set_DataMember("Links","EmployeeLinks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") With .Host .AllowGroupBy = True .SortBarVisible = True .BackColorSortBar = Exg2host1.Host.BackColor .BackColorSortBarCaption = .BackColorSortBar .SortBarCaption = "<sha ;;0><fgcolor=FF0000>Drag a <b>column</b> header here to sort by that column." With .Chart.Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With .Items.set_ExpandItem(0,True) .CountLockedColumns = 1 .BackColorLock = .BackColorAlternate With .Columns.Item("EmployeeID") .AllowGroupBy = False .set_Def(7,Exg2host1.Host.BackColorAlternate) End With .Columns.Item("Title").SortOrder = 1 End With .Host.Chart.ScrollTo(#5/27/2017#,1) End With |
34 |
How can I hide a column
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .Host.Columns.Item(0).Visible = False End With |
33 |
Can row errors being highligted until the user correct them, not to clear them as soon a change occurs
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_HostDef(exontrol.EXG2HOSTLib.DefHostPropertyEnum.exErrorClearOnChange,False) End With |
32 |
No error is highligthed
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") End With |
31 |
I've noticed that rows with errors are shown in red. Is it possible to change the colors
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_HostDef(exontrol.EXG2HOSTLib.DefHostPropertyEnum.exErrorBackColor,0) .set_HostDef(exontrol.EXG2HOSTLib.DefHostPropertyEnum.exErrorForeColor,16777215) End With |
30 |
Is it possible to rename the (New) to something else
|
29 |
How can I hide the (New) item (sample 2)
|
28 |
How can I hide the (New) item (sample 1)
|
27 |
Read-Only
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostReadOnly End With |
26 |
How can I prevent user create new /delete tasks ( only move or resize then )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataSource("Links",.get_DataSource("Items")) .set_DataMember("Links","EmployeeLinks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") With .Host.Chart.Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With .Host.Items.set_ExpandItem(0,True) .HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate .Host.Chart.ScrollTo(#5/27/2017#,1) End With |
25 |
How do I get the row/item/task/link from the cursor
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub ' HostEvent event - Notifies the application once the host fires an event. Private Sub Exg2host1_HostEvent(ByVal sender As System.Object,ByVal EventID As exontrol.EXG2HOSTLib.HostEventEnum) Handles Exg2host1.HostEvent With Exg2host1 Debug.Print( .HostContext.ToString ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate Or exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddNew End With |
24 |
Disable Delete
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate Or exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddNew End With |
23 |
Disable AddNew
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate Or exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowDelete End With |
22 |
ACCDB sample ( file )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataSource("Links",.get_DataSource("Items")) .set_DataMember("Links","EmployeeLinks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") With .Host.Chart.Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With .Host.Items.set_ExpandItem(0,True) .Host.Chart.ScrollTo(#5/27/2017#,1) End With |
21 |
MDB sample ( file )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.mdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataSource("Links",.get_DataSource("Items")) .set_DataMember("Links","EmployeeLinks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") With .Host.Chart.Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With .Host.Items.set_ExpandItem(0,True) .Host.Chart.ScrollTo(#5/27/2017#,1) End With |
20 |
DBF sample ( file )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.dbf") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") End With |
19 |
DAO sample ( object, DAO.DBEngine.120, multiple tasks, multiple tables )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub Dim rsEmployees,rsLinks,rsTasks With Exg2host1 With New DAO.PrivDBEngine() With .OpenDatabase("C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") rsEmployees = .OpenRecordset("Employees") rsTasks = .OpenRecordset("EmployeeDetails") rsLinks = .OpenRecordset("EmployeeLinks") End With End With .set_DataSource("Items",rsEmployees) .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataSource("Tasks",rsTasks) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataSource("Links",rsLinks) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") With .Host.Chart.Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With .Host.Items.set_ExpandItem(0,True) .Host.Chart.ScrollTo(#5/27/2017#,1) End With |
18 |
DAO sample ( file, multiple tasks, multiple tables )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36") .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataTechnology("Tasks","DAO.DBEngine.120;DAO.DBEngine.36") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataTechnology("Links","DAO.DBEngine.120;DAO.DBEngine.36") .set_DataSource("Links",.get_DataSource("Items")) .set_DataMember("Links","EmployeeLinks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") With .Host.Chart.Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With .Host.Items.set_ExpandItem(0,True) .Host.Chart.ScrollTo(#5/27/2017#,1) End With |
17 |
DAO sample ( object, DAO.DBEngine.120, single task, single table )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub Dim rsEmployees,rsLinks With Exg2host1 With New DAO.PrivDBEngine() With .OpenDatabase("C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") rsEmployees = .OpenRecordset("Employees") rsLinks = .OpenRecordset("EmployeeLinks") End With End With .set_DataSource("Items",rsEmployees) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,.get_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource)) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate") .set_DataSource("Links",rsLinks) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") End With |
16 |
DAO sample ( file, single task, single table )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36") .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,.get_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource)) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate") .set_DataTechnology("Links","DAO.DBEngine.120;DAO.DBEngine.36") .set_DataSource("Links",.get_DataSource("Items")) .set_DataMember("Links","EmployeeLinks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") End With |
15 |
DAO sample ( tree recordset )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36") .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") End With |
14 |
DAO sample ( flat recordset )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub Dim rsEmployees With Exg2host1 With New DAO.PrivDBEngine() With .OpenDatabase("C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") rsEmployees = .OpenRecordset("Employees") End With End With .set_DataSource("Items",rsEmployees) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") End With |
13 |
DAO sample ( flat )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36") .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") End With |
12 |
ADO sample ( object, ADODB.Recordset, multiple tasks )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub Dim rsEmployees,rsLinks,rsTasks,rstasks With Exg2host1 rsEmployees = New ADODB.Recordset() rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3,3) .set_DataSource("Items",rsEmployees) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") rsTasks = New ADODB.Recordset() rsTasks.Open("EmployeeDetails","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3,3) .set_DataSource("Tasks",rstasks) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") rsLinks = New ADODB.Recordset() rsLinks.Open("EmployeeLinks","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3,3) .set_DataSource("Links",rsLinks) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") With .Host.Chart.Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With .Host.Items.set_ExpandItem(0,True) .Host.Chart.ScrollTo(#5/27/2017#,1) End With |
11 |
ADO sample ( file, multiple tasks, multiple tables )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset") .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataTechnology("Tasks","ADODB.Recordset;ADOR.Recordset") .set_DataSource("Tasks",.get_DataSource("Items")) .set_DataMember("Tasks","EmployeeDetails") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID") .set_DataTechnology("Links","ADODB.Recordset;ADOR.Recordset") .set_DataSource("Links",.get_DataSource("Items")) .set_DataMember("Links","EmployeeLinks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") With .Host.Chart.Bars.Item("Task") .OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidGroup = "Task,Progress" End With .Host.Items.set_ExpandItem(0,True) .Host.Chart.ScrollTo(#5/27/2017#,1) End With |
10 |
ADO sample ( object, ADODB.Recordset, single task, single table )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub Dim rsEmployees,rsLinks With Exg2host1 rsEmployees = New ADODB.Recordset() rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3,3) .set_DataSource("Items",rsEmployees) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,.get_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource)) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate") rsLinks = New ADODB.Recordset() rsLinks.Open("EmployeeLinks","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3,3) .set_DataSource("Links",rsLinks) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") End With |
9 |
ADO sample ( file, single task, single table )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset") .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,.get_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource)) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate") .set_DataTechnology("Links","ADODB.Recordset;ADOR.Recordset") .set_DataSource("Links",.get_DataSource("Items")) .set_DataMember("Links","EmployeeLinks") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End") End With |
8 |
ADO sample ( tree recordset )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset") .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo") End With |
7 |
ADO sample ( flat recordset )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub Dim rsEmployees With Exg2host1 rsEmployees = New ADODB.Recordset() rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3,3) .set_DataSource("Items",rsEmployees) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") End With |
6 |
ADO sample ( flat table )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset") .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") .set_DataMember("Items","Employees") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") End With |
5 |
XML sample ( object, MSXML.DOMDocument )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub Dim xml With Exg2host1 xml = New MSXML2.FreeThreadedDOMDocument30() xml.async = False xml.load("C:\Program Files\Exontrol\ExG2Host\Sample\sample.xml") .set_DataSource("Items",xml) .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") With .Host .LinesAtRoot = -1 .SingleSel = False .AutoDrag = 3 End With End With |
4 |
XML sample ( file tree )
' Error event - Fired when an internal error occurs. Private Sub Exg2host1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exg2host1.Error With Exg2host1 Debug.Print( Err ) Debug.Print( Description ) End With End Sub With Exg2host1 .set_DataTechnology("Items","MSXML.DOMDocument") .set_DataSource("Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.xml") .set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items") With .Host .LinesAtRoot = -1 .SingleSel = False .AutoDrag = 3 End With End With |
3 |
How can I let user create new items/bars when clicking the empty area of the control
' HostEvent event - Notifies the application once the host fires an event. Private Sub Exg2host1_HostEvent(ByVal sender As System.Object,ByVal EventID As exontrol.EXG2HOSTLib.HostEventEnum) Handles Exg2host1.HostEvent With Exg2host1 Debug.Print( .get_HostEventParam(-2) ) End With End Sub With Exg2host1 .HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostReadWrite Or exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddEmptyItem With .Host .ScrollBars = exontrol.EXG2ANTTLib.ScrollBarsEnum.exVScrollEmptySpace Or exontrol.EXG2ANTTLib.ScrollBarsEnum.exDisableNoVertical With .Chart .set_PaneWidth(False,128) .AllowCreateBar = 1 End With End With End With |
2 |
How do I handle events of the host
' HostEvent event - Notifies the application once the host fires an event. Private Sub Exg2host1_HostEvent(ByVal sender As System.Object,ByVal EventID As exontrol.EXG2HOSTLib.HostEventEnum) Handles Exg2host1.HostEvent With Exg2host1 Debug.Print( .get_HostEventParam(-2) ) End With End Sub With Exg2host1 With .Host .BeginUpdate() .Columns.Add("new column") .EndUpdate() End With End With |
1 |
How can I get the version of the host/exg2antt control
With Exg2host1 Debug.Print( .Version ) Debug.Print( "Host" ) Debug.Print( .Host.Version ) End With |