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.
void onEvent_HostEvent(int   _EventID)
{
	COMVariant h,key;
	;
	h = exg2host1.HostEventParam(0);
	key = exg2host1.HostEventParam(1);
	print( exg2host1.HostEventParam(-2) );
	print( "Start:" );
	print( exg2host1.Host().Items().ItemBar(h,key,1/*exBarStart*/) );
	print( exg2host1.HostEventParam(-2) );
	print( "End:" );
	print( exg2host1.Host().Items().ItemBar(h,key,2/*exBarEnd*/) );
}

public void init()
{
	COM com_Chart,com_Items;
	COMVariant h,key;
	anytype var_Chart,var_Items;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Chart = exg2host1.Host().Chart(); com_Chart = var_Chart;
	/*should be called during the form's activate method*/ 	com_Chart.PaneWidth(false,128);
		com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("3/30/2019",213)));
	var_Items = exg2host1.Host().Items(); com_Items = var_Items;
		com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("4/1/2019",213)),COMVariant::createFromDate(str2Date("4/14/2019",213)));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
49
How do I get the bar/task from the cursor
// HostEvent event - Notifies the application once the host fires an event.
void onEvent_HostEvent(int   _EventID)
{
	COM com_Chart,com_G2antt;
	COMVariant b;
	anytype var_Chart,var_G2antt;
	int i;
	;
	print( "Event:" );
	print( exg2host1.HostEventParam(-2) );
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		i = com_G2antt.ItemFromPoint(-1,-1,c,h);
		print( "Cell:" );
		print( com_G2antt.Items().CellCaption(i,c) );
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
			b = com_Chart.BarFromPoint(-1,1);
			print( "Bar:" );
			print( exg2host1.Host().Items().ItemBar(i,b,0/*exBarName*/) );
}

public void init()
{
	COM com_Chart,com_G2antt;
	COMVariant b;
	anytype var_Chart,var_G2antt;
	int i;
	;

	super();

}
48
How do I get the cell from the cursor

// HostEvent event - Notifies the application once the host fires an event.
void onEvent_HostEvent(int   _EventID)
{
	COM com_G2antt;
	anytype var_G2antt;
	int i;
	;
	print( "Event:" );
	print( exg2host1.HostEventParam(-2) );
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		i = com_G2antt.ItemFromPoint(-1,-1,c,h);
		print( "Cell:" );
		print( com_G2antt.Items().CellCaption(i,c) );
}

public void init()
{
	COM com_G2antt;
	anytype var_G2antt;
	int i;
	;

	super();

}
47
How can I highlights cells based on its value

public void init()
{
	COM com_Column,com_Column1,com_ConditionalFormat,com_ConditionalFormats,com_G2antt,com_Items;
	anytype var_Column,var_Column1,var_ConditionalFormat,var_ConditionalFormats,var_G2antt,var_Items;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.BeginUpdate();
		com_G2antt.BackColorAlternate(WinApi::RGB2int(0,0,0));
		var_Column = COM::createFromObject(com_G2antt.Columns()).Item("Title"); com_Column = var_Column;
			com_Column.Def(4/*exCellBackColor*/,COMVariant::createFromInt(15790320));
			com_Column.Width(com_Column.AutoWidth());
		var_ConditionalFormats = com_G2antt.ConditionalFormats(); com_ConditionalFormats = var_ConditionalFormats;
			var_ConditionalFormat = COM::createFromObject(com_ConditionalFormats.Add("lower(%4) contains `manager`")); com_ConditionalFormat = var_ConditionalFormat;
			com_ConditionalFormat.Bold(true);
			var_ConditionalFormat = COM::createFromObject(com_ConditionalFormats.Add("%3")); com_ConditionalFormat = var_ConditionalFormat;
			com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240));
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.ExpandItem(0,true);
		var_Column1 = COM::createFromObject(com_G2antt.Columns()).Item("EmployeeID"); com_Column1 = var_Column1;
			com_Column1.Width(com_Column1.AutoWidth());
		com_G2antt.EndUpdate();
}
46
How do I programatically hide a column

public void init()
{
	COM com_Column;
	anytype var_Column;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	var_Column = COM::createFromObject(exg2host1.Host().Columns()).Item("LastName"); com_Column = var_Column;
	com_Column.Visible(false);
}
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.
void onEvent_HostEvent(int   _EventID)
{
	COM com_G2antt;
	COMVariant b;
	anytype var_G2antt;
	int i;
	;
	print( exg2host1.HostEventParam(-2) );
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		i = com_G2antt.ItemFromPoint(-1,-1,c,hit);
		print( "cell's value from cursor: " );
		print( com_G2antt.Items().CellValue(i,c) );
		print( "cell's value on col 1: " );
		print( com_G2antt.Items().CellValue(i,COMVariant::createFromInt(1)) );
		b = com_G2antt.Chart().BarFromPoint(-1,-1);
		print( "Bar:" );
		print( b );
		print( "Bar Start:" );
		print( com_G2antt.Items().ItemBar(i,b,1/*exBarStart*/) );
		print( "Bar End:" );
		print( com_G2antt.Items().ItemBar(i,b,2/*exBarEnd*/) );
		print( "Bar Caption:" );
		print( com_G2antt.Items().ItemBar(i,b,3/*exBarCaption*/) );
}

public void init()
{
	COM com_Bar,com_Chart,com_G2antt;
	COMVariant b;
	anytype var_Bar,var_Chart,var_G2antt;
	int i;
	;

	super();

	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.Debug(true);
		var_Chart = COM::createFromObject(com_G2antt.Chart()); com_Chart = var_Chart;
		var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar;
			com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
			com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	var_Chart = exg2host1.Host().Chart(); com_Chart = var_Chart;
	/*should be called during the form's activate method*/ 	com_Chart.PaneWidth(false,128);
		com_Chart.ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
44
How do I get the bar from the cursor

// HostEvent event - Notifies the application once the host fires an event.
void onEvent_HostEvent(int   _EventID)
{
	;
	print( exg2host1.HostEventParam(-2) );
	print( exg2host1.Host().Chart().BarFromPoint(-1,-1) );
}

public void init()
{
	COM com_Appearance,com_Bar,com_Chart,com_G2antt;
	anytype var_Appearance,var_Bar,var_Chart,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		var_Appearance = COM::createFromObject(com_G2antt.VisualAppearance()); com_Appearance = var_Appearance;
		com_Appearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn");
		var_Chart = COM::createFromObject(com_G2antt.Chart()); com_Chart = var_Chart;
		var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar;
			com_Bar.Height(15);
			com_Bar.Color(0x1ff0000);
			com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
			com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	var_Chart = exg2host1.Host().Chart(); com_Chart = var_Chart;
	/*should be called during the form's activate method*/ 	com_Chart.PaneWidth(false,128);
		com_Chart.ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
43
How do I add Start/End columns

// HostEvent event - Notifies the application once the host fires an event.
void onEvent_HostEvent(int   _EventID)
{
	;
	print( exg2host1.HostEventParam(-2) );
}

public void init()
{
	COM com_Bar,com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_G2antt,com_Items;
	anytype var_Bar,var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_G2antt,var_Items;
	;

	super();

	exg2host1.HostReadOnly(255/*exHostReadWrite | exHostAllowAddEmptyItem*/);
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.SingleSel(false);
		com_G2antt.OnResizeControl(1/*exResizeChart*/);
		com_G2antt.ScrollBars(2058/*exVScrollEmptySpace | exDisableNoVertical*/);
		var_Columns = COM::createFromObject(com_G2antt.Columns()); com_Columns = var_Columns;
		var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column;
			com_Column.AllowSizing(false);
			com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1));
			var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor;
			com_Editor.EditType(7/*DateType*/);
		var_Columns = COM::createFromObject(com_G2antt.Columns()); com_Columns = var_Columns;
		var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1;
			com_Column1.AllowSizing(false);
			com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2));
			var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor;
			com_Editor.EditType(7/*DateType*/);
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AllowCellValueToItemBar(true);
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
			com_Chart.AllowCreateBar(1/*exCreateBarAuto*/);
	/*should be called during the form's activate method*/ 		com_Chart.PaneWidth(false,256);
			var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar;
			com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
42
How do I hide the left/items/columns part of the control

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar,com_Chart,com_G2antt;
	anytype var_Bar,var_Chart,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.Pattern(1/*exPatternSolid*/);
		com_Bar.Color(WinApi::RGB2int(0,0,255));
		com_Bar.Def(19/*exBarTransparent*/,COMVariant::createFromInt(50));
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.HostReadOnly(255/*exHostReadWrite | exHostAllowAddEmptyItem*/);
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.OnResizeControl(129/*exDisableSplitter | exResizeChart*/);
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
			com_Chart.ColumnsFormatLevel("1");
	/*should be called during the form's activate method*/ 		com_Chart.PaneWidth(false,0);
			com_Chart.ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
41
How do I hide the right/chart/tasks part of the control

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar,com_Chart,com_G2antt;
	anytype var_Bar,var_Chart,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.Pattern(1/*exPatternSolid*/);
		com_Bar.Color(WinApi::RGB2int(0,0,255));
		com_Bar.Def(19/*exBarTransparent*/,COMVariant::createFromInt(50));
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
	/*should be called during the form's activate method*/ 		com_Chart.PaneWidth(true,0);
			com_Chart.OverviewVisible(0/*exOverviewHidden*/);
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
40
How do hide the top/overview part of the control

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Chart,com_G2antt;
	anytype var_Chart,var_G2antt;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataField(7/*exTasksDataSource*/,exg2host1.DataField(0/*exItemsDataSource*/));
	exg2host1.DataField(9/*exTasksStart*/,"BirthDate");
	exg2host1.DataField(10/*exTasksEnd*/,"HireDate");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
			com_Chart.OverviewVisible(0/*exOverviewHidden*/);
	/*should be called during the form's activate method*/ 		com_Chart.PaneWidth(false,256);
			com_Chart.ScrollTo(str2Date("4/27/1969",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
39
How do I resize the panels

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Appearance,com_Bar,com_Chart,com_G2antt;
	anytype var_Appearance,var_Bar,var_Chart,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		var_Appearance = COM::createFromObject(com_G2antt.VisualAppearance()); com_Appearance = var_Appearance;
		com_Appearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn");
		var_Chart = COM::createFromObject(com_G2antt.Chart()); com_Chart = var_Chart;
		var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar;
			com_Bar.Height(15);
			com_Bar.Color(0x1ff0000);
			com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
			com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	var_Chart = exg2host1.Host().Chart(); com_Chart = var_Chart;
	/*should be called during the form's activate method*/ 	com_Chart.PaneWidth(false,128);
		com_Chart.ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
38
How do I lock the first column

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_G2antt;
	anytype var_G2antt;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.CountLockedColumns(1);
		com_G2antt.BackColorLock(com_G2antt.BackColorAlternate());
}
37
How do I specify a different color for the tasks ( EBN color )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Appearance,com_Bar,com_Chart,com_G2antt;
	anytype var_Appearance,var_Bar,var_Chart,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		var_Appearance = COM::createFromObject(com_G2antt.VisualAppearance()); com_Appearance = var_Appearance;
		com_Appearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn");
		var_Chart = COM::createFromObject(com_G2antt.Chart()); com_Chart = var_Chart;
		var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar;
			com_Bar.Height(15);
			com_Bar.Color(0x1ff0000);
			com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
			com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	/*should be called during the form's activate method*/ exg2host1.Host().Chart().PaneWidth(false,256);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
36
How do I specify a different color for the tasks ( solid color, transparent )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.Pattern(1/*exPatternSolid*/);
		com_Bar.Color(WinApi::RGB2int(0,0,255));
		com_Bar.Def(19/*exBarTransparent*/,COMVariant::createFromInt(50));
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	/*should be called during the form's activate method*/ exg2host1.Host().Chart().PaneWidth(false,256);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
35
GroupBy

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar,com_Chart,com_Column,com_Column1,com_G2antt,com_Items;
	anytype var_Bar,var_Chart,var_Column,var_Column1,var_G2antt,var_Items;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.AllowGroupBy(true);
		com_G2antt.SortBarVisible(true);
		com_G2antt.BackColorSortBar(exg2host1.Host().BackColor());
		com_G2antt.BackColorSortBarCaption(com_G2antt.BackColorSortBar());
		com_G2antt.SortBarCaption("<sha ;;0><fgcolor=FF0000>Drag a <b>column</b> header here to sort by that column.");
		var_Chart = COM::createFromObject(com_G2antt.Chart()); com_Chart = var_Chart;
		var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar;
			com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
			com_Bar.OverlaidGroup("Task,Progress");
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.ExpandItem(0,true);
		com_G2antt.CountLockedColumns(1);
		com_G2antt.BackColorLock(com_G2antt.BackColorAlternate());
		var_Column = COM::createFromObject(com_G2antt.Columns()).Item("EmployeeID"); com_Column = var_Column;
			com_Column.AllowGroupBy(false);
			com_Column.Def(7/*exHeaderBackColor*/,exg2host1.Host().BackColorAlternate());
		var_Column1 = COM::createFromObject(com_G2antt.Columns()).Item("Title"); com_Column1 = var_Column1;
		com_Column1.SortOrder(1/*SortAscending*/);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
34
How can I hide a column
// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Column;
	anytype var_Column;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	var_Column = COM::createFromObject(exg2host1.Host().Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column;
	com_Column.Visible(false);
}
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.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.HostDef(7/*exErrorClearOnChange*/,COMVariant::createFromBoolean(false));
}
32
No error is highligthed

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
}
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.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.HostDef(6/*exErrorBackColor*/,COMVariant::createFromInt(0));
	exg2host1.HostDef(5/*exErrorForeColor*/,COMVariant::createFromInt(16777215));
}
30
Is it possible to rename the (New) to something else

public void init()
{
	COM com_G2antt,com_Items;
	anytype var_G2antt,var_Items;
	;

	super();

	exg2host1.HostDef(1/*exNew*/,"*");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.BeginUpdate();
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("A");
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("B");
		com_G2antt.EndUpdate();
	exg2host1.Refresh();
}
29
How can I hide the (New) item (sample 2)

public void init()
{
	COM com_G2antt,com_Items;
	anytype var_G2antt,var_Items;
	;

	super();

	exg2host1.HostReadOnly(240/*exHostAllowUpdate | exHostAllowDelete*/);
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.BeginUpdate();
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("A");
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("B");
		com_G2antt.EndUpdate();
}
28
How can I hide the (New) item (sample 1)

public void init()
{
	COM com_G2antt,com_Items;
	anytype var_G2antt,var_Items;
	;

	super();

	exg2host1.HostDef(1/*exNew*/,"");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.BeginUpdate();
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("A");
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("B");
		com_G2antt.EndUpdate();
	exg2host1.Refresh();
}
27
Read-Only

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.HostReadOnly(0/*exHostReadOnly*/);
}
26
How can I prevent user create new /delete tasks ( only move or resize then )
// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.HostReadOnly(128/*exHostAllowUpdate*/);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
25
How do I get the row/item/task/link from the cursor

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

// HostEvent event - Notifies the application once the host fires an event.
void onEvent_HostEvent(int   _EventID)
{
	;
	print( exg2host1.HostContext().ToString() );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.HostReadOnly(141/*exHostAllowUpdate | exHostAllowAddNew*/);
}
24
Disable Delete
// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.HostReadOnly(141/*exHostAllowUpdate | exHostAllowAddNew*/);
}
23
Disable AddNew

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.HostReadOnly(240/*exHostAllowUpdate | exHostAllowDelete*/);
}
22
ACCDB sample ( file )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
21
MDB sample ( file )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.mdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
20
DBF sample ( file )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.dbf");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
}
19
DAO sample ( object, DAO.DBEngine.120, multiple tasks, multiple tables )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar,com_Database,com_PrivDBEngine,com_rsEmployees,com_rsLinks,com_rsTasks;
	anytype rsEmployees,rsLinks,rsTasks,var_Bar,var_Database,var_PrivDBEngine;
	;

	super();

	// Add 'Microsoft Office 12.0 Access database engine Object Library(ACEDAO.DLL)' reference to your project.
	var_PrivDBEngine = COM::createFromObject(new DAO.PrivDBEngine()); com_PrivDBEngine = var_PrivDBEngine;
		var_Database = com_PrivDBEngine.OpenDatabase("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); com_Database = var_Database;
			rsEmployees = com_Database.OpenRecordset("Employees"); com_rsEmployees = rsEmployees;
			rsTasks = com_Database.OpenRecordset("EmployeeDetails"); com_rsTasks = rsTasks;
			rsLinks = com_Database.OpenRecordset("EmployeeLinks"); com_rsLinks = rsLinks;
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",COM::createFromVariant(rsTasks));
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataSource("Links",COM::createFromVariant(rsLinks));
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
18
DAO sample ( file, multiple tasks, multiple tables )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	exg2host1.DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataTechnology("Tasks","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataTechnology("Links","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
17
DAO sample ( object, DAO.DBEngine.120, single task, single table )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Database,com_PrivDBEngine,com_rsEmployees,com_rsLinks;
	anytype rsEmployees,rsLinks,var_Database,var_PrivDBEngine;
	;

	super();

	// Add 'Microsoft Office 12.0 Access database engine Object Library(ACEDAO.DLL)' reference to your project.
	var_PrivDBEngine = COM::createFromObject(new DAO.PrivDBEngine()); com_PrivDBEngine = var_PrivDBEngine;
		var_Database = com_PrivDBEngine.OpenDatabase("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); com_Database = var_Database;
			rsEmployees = com_Database.OpenRecordset("Employees"); com_rsEmployees = rsEmployees;
			rsLinks = com_Database.OpenRecordset("EmployeeLinks"); com_rsLinks = rsLinks;
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataField(7/*exTasksDataSource*/,exg2host1.DataField(0/*exItemsDataSource*/));
	exg2host1.DataField(9/*exTasksStart*/,"BirthDate");
	exg2host1.DataField(10/*exTasksEnd*/,"HireDate");
	exg2host1.DataSource("Links",COM::createFromVariant(rsLinks));
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
}
16
DAO sample ( file, single task, single table )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataField(7/*exTasksDataSource*/,exg2host1.DataField(0/*exItemsDataSource*/));
	exg2host1.DataField(9/*exTasksStart*/,"BirthDate");
	exg2host1.DataField(10/*exTasksEnd*/,"HireDate");
	exg2host1.DataTechnology("Links","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
}
15
DAO sample ( tree recordset )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
}
14
DAO sample ( flat recordset )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Database,com_PrivDBEngine,com_rsEmployees;
	anytype rsEmployees,var_Database,var_PrivDBEngine;
	;

	super();

	// Add 'Microsoft Office 12.0 Access database engine Object Library(ACEDAO.DLL)' reference to your project.
	var_PrivDBEngine = COM::createFromObject(new DAO.PrivDBEngine()); com_PrivDBEngine = var_PrivDBEngine;
		var_Database = com_PrivDBEngine.OpenDatabase("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); com_Database = var_Database;
			rsEmployees = com_Database.OpenRecordset("Employees"); com_rsEmployees = rsEmployees;
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
}
13
DAO sample ( flat )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
}
12
ADO sample ( object, ADODB.Recordset, multiple tasks )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar,com_rsEmployees,com_rsLinks,com_rsTasks;
	anytype rsEmployees,rsLinks,rsTasks,var_Bar;
	;

	super();

	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rsEmployees = COM::createFromObject(new ADODB.Recordset()); com_rsEmployees = rsEmployees;
	rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	rsTasks = COM::createFromObject(new ADODB.Recordset()); com_rsTasks = rsTasks;
	rsTasks.Open("EmployeeDetails","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Tasks",COM::createFromVariant(rstasks));
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	rsLinks = COM::createFromObject(new ADODB.Recordset()); com_rsLinks = rsLinks;
	rsLinks.Open("EmployeeLinks","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Links",COM::createFromVariant(rsLinks));
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
11
ADO sample ( file, multiple tasks, multiple tables )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	exg2host1.DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataTechnology("Tasks","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataTechnology("Links","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
10
ADO sample ( object, ADODB.Recordset, single task, single table )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_rsEmployees,com_rsLinks;
	anytype rsEmployees,rsLinks;
	;

	super();

	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rsEmployees = COM::createFromObject(new ADODB.Recordset()); com_rsEmployees = rsEmployees;
	rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataField(7/*exTasksDataSource*/,exg2host1.DataField(0/*exItemsDataSource*/));
	exg2host1.DataField(9/*exTasksStart*/,"BirthDate");
	exg2host1.DataField(10/*exTasksEnd*/,"HireDate");
	rsLinks = COM::createFromObject(new ADODB.Recordset()); com_rsLinks = rsLinks;
	rsLinks.Open("EmployeeLinks","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Links",COM::createFromVariant(rsLinks));
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
}
9
ADO sample ( file, single task, single table )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataField(7/*exTasksDataSource*/,exg2host1.DataField(0/*exItemsDataSource*/));
	exg2host1.DataField(9/*exTasksStart*/,"BirthDate");
	exg2host1.DataField(10/*exTasksEnd*/,"HireDate");
	exg2host1.DataTechnology("Links","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
}
8
ADO sample ( tree recordset )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
}
7
ADO sample ( flat recordset )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_rsEmployees;
	anytype rsEmployees;
	;

	super();

	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rsEmployees = COM::createFromObject(new ADODB.Recordset()); com_rsEmployees = rsEmployees;
	rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
}
6
ADO sample ( flat table )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
}
5
XML sample ( object, MSXML.DOMDocument )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_G2antt,com_xml;
	anytype var_G2antt,xml;
	;

	super();

	// Add 'Microsoft XML, v3.0(msxml3.dll)' reference to your project.
	xml = COM::createFromObject(new MSXML2.FreeThreadedDOMDocument30()); com_xml = xml;
	xml.async(false);
	xml.load("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.xml");
	exg2host1.DataSource("Items",COM::createFromVariant(xml));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.LinesAtRoot(-1/*exLinesAtRoot*/);
		com_G2antt.SingleSel(false);
		com_G2antt.AutoDrag(3/*exAutoDragPositionAny*/);
}
4
XML sample ( file tree )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_G2antt;
	anytype var_G2antt;
	;

	super();

	exg2host1.DataTechnology("Items","MSXML.DOMDocument");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.xml");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.LinesAtRoot(-1/*exLinesAtRoot*/);
		com_G2antt.SingleSel(false);
		com_G2antt.AutoDrag(3/*exAutoDragPositionAny*/);
}
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.
void onEvent_HostEvent(int   _EventID)
{
	;
	print( exg2host1.HostEventParam(-2) );
}

public void init()
{
	COM com_Chart,com_G2antt;
	anytype var_Chart,var_G2antt;
	;

	super();

	exg2host1.HostReadOnly(255/*exHostReadWrite | exHostAllowAddEmptyItem*/);
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.ScrollBars(2058/*exVScrollEmptySpace | exDisableNoVertical*/);
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
	/*should be called during the form's activate method*/ 		com_Chart.PaneWidth(false,128);
			com_Chart.AllowCreateBar(1/*exCreateBarAuto*/);
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
2
How do I handle events of the host

// HostEvent event - Notifies the application once the host fires an event.
void onEvent_HostEvent(int   _EventID)
{
	;
	print( exg2host1.HostEventParam(-2) );
}

public void init()
{
	COM com_Columns,com_G2antt;
	anytype var_Columns,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.BeginUpdate();
		var_Columns = COM::createFromObject(com_G2antt.Columns()); com_Columns = var_Columns;
		com_Columns.Add("new column");
		com_G2antt.EndUpdate();
}
1
How can I get the version of the host/exg2antt control

public void init()
{
	;

	super();

	print( exg2host1.Version() );
	print( "Host" );
	print( exg2host1.Host().Version() );
}