1900:
InsertControlItem / UserEditor / A2X:

with AxG2antt1 do
begin
	BeginUpdate();
	BackColor := Color.FromArgb(240,240,240);
	Chart.PaneWidth[True] := 0;
	ConditionalFormats.Add('1 = 1',Nil).Bold := True;
	(Columns.Add('Type') as EXG2ANTTLib.Column).Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
	with Items do
	begin
		h := AddItem('1. A ProgID such as "MSCAL.Calendar.7"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'MSCAL.Calendar','');
		(ItemObject[hX] as MSACAL.Calendar).BackColor := $ffffff;
		h := AddItem('2. A CLSID such as "{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}','');
		(ItemObject[hX] as EXHTMLLib.HTML).BackColor := $ffffff;
		h := AddItem('3. A URL such as "http://www.exontrol.com"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'http://www.exontrol.com','');
		h := AddItem('4. A reference to an Active document such as "file://\\Documents\MyDoc.doc"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'file://C:\empesting.xml','');
		h := AddItem('5.A fragment of HTML such as "MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'MSHTML:<HTML><BODY>This is a <b>line of</b> text</BODY></HTML>','');
		ItemHeight[hX] := 56;
		h := AddItem('6.Anything, if it is preffixed by "A2X:"');
		ItemDivider[h] := 0;
		hX := InsertControlItem(0,'A2X:TOC24.Toc24Ctrl.1','');
	end;
	EndUpdate();
end
1899:
How do I add a RichTextBox editor
// UserEditorOleEvent event - Occurs when an user editor fires an event.
procedure TWinForm1.AxG2antt1_UserEditorOleEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_UserEditorOleEventEvent);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( e.ev );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	DefaultItemHeight := 32;
	with (Columns.Add('RICHTEXT') as EXG2ANTTLib.Column).Editor do
	begin
		EditType := EXG2ANTTLib.EditTypeEnum.UserEditorType;
		UserEditor('RICHTEXT.RichtextCtrl','');
		with (UserEditorObject as RichTextLib.RichTextBox) do
		begin
			AutoVerbMenu := True;
			TextRTF := '{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard\r\nThis is some {\b bold} text.\par\r\n}';
		end;
	end;
	with Items do
	begin
		AddItem('RICHTEXT.RichtextCtrl');
	end;
	EndUpdate();
end
1898:
Is it possible to trap a double-click event on a specific cell and when that happens, to set the cell to a specific value
// DblClick event - Occurs when the user dblclk the left mouse button over an object.
procedure TWinForm1.AxG2antt1_DblClick(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_DblClickEvent);
begin
	with AxG2antt1 do
	begin
		h := get_ItemFromPoint(-1,-1,c,hit);
		OutputDebugString( Items.CellValue[TObject(h),TObject(c)] );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		CellValue[TObject(AddItem('Item 1')),TObject(1)] := 'Item 2';
		CellValue[TObject(AddItem('Item 3')),TObject(1)] := 'Item 4';
		CellValue[TObject(AddItem('Item 5')),TObject(1)] := 'Item 6';
	end;
	EndUpdate();
end
1897:
How can I display dates in DD/MM/YYYY format

with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := False;
	Columns.Add('Date');
	with Items do
	begin
		ItemDivider[AddItem('Different Date Formats')] := 0;
		FormatCell[TObject(AddItem('12/1/1971')),TObject(0)] := '((shortdateF(value) mid 4) left 2) + `/` + (shortdateF (value) left 2) + `/` + (shortdateF (value) right 4)';
		FormatCell[TObject(AddItem('12/1/1971')),TObject(0)] := '(1 array (0:=(shortdateF(value) split `/`))) + `/` + (0 array (=:0) ) + `/` + (2 array (=:0) )';
		FormatCell[TObject(AddItem('12/1/1971')),TObject(0)] := '((`0` + day(value) ) right 2) + `/` + ((`0` + month(value) ) right 2) + `/` + year(value)';
		FormatCell[TObject(AddItem('12/1/1971')),TObject(0)] := 'day(value) + `/` + month(value) + `/` + year(value)';
		FormatCell[TObject(AddItem('12/1/1971')),TObject(0)] := 'year(value) + ` - ` + day(value) + ` - ` + month(value)';
		h := AddItem('12/1/1971');
		ItemHeight[h] := 24;
		CellValueFormat[TObject(h),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
		FormatCell[TObject(h),TObject(0)] := '`<b>` + year(value) + `</b><off -4> ` + day(value) + ` - ` + month(value)';
		ItemDivider[AddItem('Predefined Date Formats')] := 0;
		FormatCell[TObject(AddItem('12/1/1971')),TObject(0)] := 'value';
		FormatCell[TObject(AddItem('12/1/1971')),TObject(0)] := 'shortdateF(value)';
		FormatCell[TObject(AddItem('12/1/1971')),TObject(0)] := 'shortdate(value)';
		FormatCell[TObject(AddItem('12/1/1971')),TObject(0)] := 'longdate(value)';
	end;
	EndUpdate();
end
1896:
I have noticed that the column gets resized once I release the mouse. I have a column that displays multiple-lines cells, and the text gets wrapped only when user releases the mouse. Is it possible to get resized contiguously as I had before
with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := False;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
	ColumnsAllowSizing := True;
	(Columns.Add('Column A (cont)') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exColumnResizeContiguously] := TObject(True);
	Columns.Add('Column 1');
	(Columns.Add('Column B (cont)') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exColumnResizeContiguously] := TObject(True);
	Columns.Add('Column 2');
	EndUpdate();
end
1895:
How do I get the column from cursor, when it hovers the empty portion of the items section
// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
	with AxG2antt1 do
	begin
		i := get_ItemFromPoint(0,-1,c,hit);
		OutputDebugString( 'Column' );
		OutputDebugString( c );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
	Columns.Add('Column 0');
	Columns.Add('Column 1');
	Columns.Add('Column 2');
	EndUpdate();
end
1894:
How do I add items once the user clicks the empty area
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TWinForm1.AxG2antt1_ClickEvent(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		i := get_ItemFromPoint(0,-1,c,hit);
		with Items do
		begin
			CellValue[TObject(AddItem(TObject(i))),TObject(1)] := TObject(c);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Number of Items to Add');
	Columns.Add('Click on Column');
	EndUpdate();
end
1893:
Is there an easy way to get an effect like in a Microsoft Access / SQL-Server Table view, where you can scroll-up till the last row containing data is displayed as top-row

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\VB\SAMPLE.MDB',1,1,Nil);
	end;
	with Chart do
	begin
		FirstVisibleDate := '10/21/1994';
		LevelCount := 2;
	end;
	DataSource := (rs as ADODB.Recordset);
	ScrollBars := Integer(EXG2ANTTLib.ScrollBarsEnum.exVScrollEmptySpace) Or Integer(EXG2ANTTLib.ScrollBarsEnum.exBoth);
	set_ScrollPos(True,Items.ItemCount);
	EndUpdate();
end
1892:
Is there any option to stop events
// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( 'AddItem event is fired only if FreezeEvents(False) is called' );
	end
end;

// AddLink event - Occurs when the user links two bars using the mouse.
procedure TWinForm1.AxG2antt1_AddLink(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddLinkEvent);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( 'AddLink event is fired only if FreezeEvents(False) is called' );
	end
end;

// BarResize event - Occurs when a bar is moved or resized.
procedure TWinForm1.AxG2antt1_BarResize(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( 'BarResize event is fired only if FreezeEvents(False) is called' );
	end
end;

with AxG2antt1 do
begin
	FreezeEvents(True);
	BeginUpdate();
	DefaultItemHeight := 24;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/4/2001','',Nil);
		AddLink('L1',h1,'',h2,'');
		SchedulePDM(0,'');
	end;
	EndUpdate();
	FreezeEvents(False);
end
1891:
How do I specify a more intensive color if using RenderType property

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		RenderType := -16777216;
		Add(1,'gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHI' + 
	'ERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6S' + 
	'TCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpF' + 
	'HIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQhaX' + 
	'QIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC');
		Add(2,'gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh' + 
	'+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa' + 
	'ZACj4arKejrRDCMAggI=');
	end;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Color := $1000000;
		end;
		with Bars.Item['Summary'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Color := $2000000;
		end;
	end;
	with Items do
	begin
		hSummaryJ := AddItem('Summary A');
		AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J',Nil);
		hTaskJ := InsertItem(hSummaryJ,Nil,'Task A.1');
		AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1',Nil);
		hTaskJ := InsertItem(hSummaryJ,Nil,'Task A.2');
		AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2',Nil);
		DefineSummaryBars(hSummaryJ,'J',-1,'<*>');
		hSummaryK := AddItem('Summary B');
		AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Nil);
		hTaskK := InsertItem(hSummaryK,Nil,'Task B.1');
		AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTaskK := InsertItem(hSummaryK,Nil,'Task B.2');
		AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Nil);
		DefineSummaryBars(hSummaryK,'K',-1,'<*>');
		ItemBar[0,'<K*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
1890:
How can I include the child items, when a filter is applied

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := False;
	SearchColumnIndex := 1;
	Indent := 16;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	FilterBarPromptVisible := True;
	FilterBarPromptPattern := 'Nancy';
	FilterInclude := EXG2ANTTLib.FilterIncludeEnum.exItemsWithChilds;
	Chart.LevelCount := 2;
	with Columns do
	begin
		(Add('Name') as EXG2ANTTLib.Column).Width := 96;
		(Add('Title') as EXG2ANTTLib.Column).Width := 96;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Seattle';
		h0 := InsertItem(h0,Nil,'Andrew Fuller');
		CellValue[TObject(h0),TObject(1)] := 'Vice President, Sales';
		CellValue[TObject(h0),TObject(2)] := 'Tacoma';
		h0 := InsertItem(h0,Nil,'Michael Suyama');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Janet Leverling');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Kirkland';
		h0 := InsertItem(h0,Nil,'Margaret Peacock');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Redmond';
		ExpandItem[0] := True;
	end;
	ApplyFilter();
	EndUpdate();
end
1889:
Is it possible to change the date format shown when you scroll the horizontal bar on the chart

with AxG2antt1 do
begin
	Chart.ToolTip := '<b>Date</b><br><%loc_ldate%>';
end
1888:
How do I change the drop down filter icon/button (white)

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(2,'gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgANJ' + 
	'0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8YN' + 
	'YuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4h' + 
	'hKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mgb' + 
	'hOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhWB' + 
	'MJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=');
		Add(1,'CP:2 -4 -4 2 4');
	end;
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,$1000000);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,BackColor);
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.None2;
	BackColorHeader := Color.FromArgb(255,255,255);
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	HeaderHeight := 24;
	with (Columns.Add('Filter') as EXG2ANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		AllowSort := False;
		AllowDragging := False;
	end;
	with Chart do
	begin
		PaneWidth[False] := 196;
		LevelCount := 2;
	end;
	EndUpdate();
end
1887:
How do I prevent changing the cell's state ( check-box state )

// CellStateChanging event - Fired before cell's state is about to be changed.
procedure TWinForm1.AxG2antt1_CellStateChanging(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_CellStateChangingEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			e.newState := CellState[TObject(e.item),TObject(e.colIndex)];
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with (Columns.Add('P1') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	with (Columns.Add('P2') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1886:
How do I change the color of the columns's header to cover all levels

with AxG2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	BackColorLevelHeader := BackColorHeader;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	DefaultItemHeight := 36;
	TreeColumnIndex := -1;
	with Columns do
	begin
		with (Add('C1') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
			Width := 24;
			AllowSizing := False;
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(3);
		end;
		with (Add('C2') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(2);
		end;
		Add('Column1');
	end;
	with Chart do
	begin
		BackColorLevelHeader := AxG2antt1.BackColorHeader;
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
		FirstVisibleDate := '6/22/2014';
		PaneWidth[False] := 256;
	end;
	with Items do
	begin
		h := AddItem('');
		CellValue[TObject(h),TObject(1)] := 'Cell 1.2';
		CellValue[TObject(h),TObject(2)] := 'Cell 1.3';
		AddBar(h,'Task','6/23/2014','6/25/2014',Nil,Nil);
		h := AddItem('');
		CellValue[TObject(h),TObject(1)] := 'Cell 2.2';
		CellValue[TObject(h),TObject(2)] := 'Cell 2.3';
		AddBar(h,'Task','6/26/2014','6/28/2014',Nil,Nil);
	end;
	EndUpdate();
end
1885:
Is it possible to extend the columns's header to fill all levels

with AxG2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	DefaultItemHeight := 36;
	TreeColumnIndex := -1;
	with Columns do
	begin
		with (Add('C1') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
			Width := 24;
			AllowSizing := False;
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(3);
		end;
		with (Add('C2') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(2);
		end;
		Add('Column1');
	end;
	with Chart do
	begin
		BackColorLevelHeader := AxG2antt1.BackColorHeader;
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
		FirstVisibleDate := '6/22/2014';
		PaneWidth[False] := 256;
	end;
	with Items do
	begin
		h := AddItem('');
		CellValue[TObject(h),TObject(1)] := 'Cell 1.2';
		CellValue[TObject(h),TObject(2)] := 'Cell 1.3';
		AddBar(h,'Task','6/23/2014','6/25/2014',Nil,Nil);
		h := AddItem('');
		CellValue[TObject(h),TObject(1)] := 'Cell 2.2';
		CellValue[TObject(h),TObject(2)] := 'Cell 2.3';
		AddBar(h,'Task','6/26/2014','6/28/2014',Nil,Nil);
	end;
	EndUpdate();
end
1884:
How do I change the color of the columns's header to cover all levels (sample CRD)

with AxG2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	BackColorLevelHeader := BackColorHeader;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	DefaultItemHeight := 36;
	TreeColumnIndex := -1;
	with Columns do
	begin
		with (Add('C1') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
			Width := 24;
			AllowSizing := False;
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(3);
		end;
		with (Add('C2') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(2);
		end;
		(Add('Column1') as EXG2ANTTLib.Column).Visible := False;
		(Add('Column2') as EXG2ANTTLib.Column).Visible := False;
		(Add('Column3') as EXG2ANTTLib.Column).Visible := False;
		with (Add('FormatLevel') as EXG2ANTTLib.Column) do
		begin
			FormatLevel := '18;"Info"[a=17]/(2/3,4)';
			Def[EXG2ANTTLib.DefColumnEnum.exCellFormatLevel] := '2/3,4';
		end;
	end;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
		FirstVisibleDate := '6/22/2014';
		PaneWidth[False] := 256;
		BackColorLevelHeader := AxG2antt1.BackColorHeader;
	end;
	with Items do
	begin
		h := AddItem('');
		CellValue[TObject(h),TObject(1)] := 'Cell 1.2';
		CellValue[TObject(h),TObject(2)] := 'Cell 1.3';
		AddBar(h,'Task','6/23/2014','6/25/2014',Nil,Nil);
		h := AddItem('');
		CellValue[TObject(h),TObject(1)] := 'Cell 2.2';
		CellValue[TObject(h),TObject(2)] := 'Cell 2.3';
		AddBar(h,'Task','6/26/2014','6/28/2014',Nil,Nil);
	end;
	EndUpdate();
end
1883:
Is it possible to extend the columns's header to fill all levels (sample CRD)

with AxG2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	DefaultItemHeight := 36;
	TreeColumnIndex := -1;
	with Columns do
	begin
		with (Add('C1') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
			Width := 24;
			AllowSizing := False;
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(3);
		end;
		with (Add('C2') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(2);
		end;
		(Add('Column1') as EXG2ANTTLib.Column).Visible := False;
		(Add('Column2') as EXG2ANTTLib.Column).Visible := False;
		(Add('Column3') as EXG2ANTTLib.Column).Visible := False;
		with (Add('FormatLevel') as EXG2ANTTLib.Column) do
		begin
			FormatLevel := '18;"Info"[a=17]/(2/3,4)';
			Def[EXG2ANTTLib.DefColumnEnum.exCellFormatLevel] := '2/3,4';
		end;
	end;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
		FirstVisibleDate := '6/22/2014';
		PaneWidth[False] := 256;
		BackColorLevelHeader := AxG2antt1.BackColorHeader;
	end;
	with Items do
	begin
		h := AddItem('');
		CellValue[TObject(h),TObject(1)] := 'Cell 1.2';
		CellValue[TObject(h),TObject(2)] := 'Cell 1.3';
		AddBar(h,'Task','6/23/2014','6/25/2014',Nil,Nil);
		h := AddItem('');
		CellValue[TObject(h),TObject(1)] := 'Cell 2.2';
		CellValue[TObject(h),TObject(2)] := 'Cell 2.3';
		AddBar(h,'Task','6/26/2014','6/28/2014',Nil,Nil);
	end;
	EndUpdate();
end
1882:
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (Columns.Add('Date') as EXG2ANTTLib.Column) do
	begin
		SortType := EXG2ANTTLib.SortTypeEnum.SortDate;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		DisplayFilterDate := True;
		FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsDesc);
	end;
	with (Columns.Add('DateTime') as EXG2ANTTLib.Column) do
	begin
		SortType := EXG2ANTTLib.SortTypeEnum.SortDateTime;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsDesc);
	end;
	with (Columns.Add('Time') as EXG2ANTTLib.Column) do
	begin
		SortType := EXG2ANTTLib.SortTypeEnum.SortTime;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsDesc);
		FormatColumn := 'time(value)';
	end;
	with (Columns.Add('Numeric') as EXG2ANTTLib.Column) do
	begin
		SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
		DisplayFilterButton := True;
		FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsDesc);
	end;
	with (Columns.Add('String') as EXG2ANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsDesc);
	end;
	with Items do
	begin
		h := AddItem('1/27/2010');
		CellValue[TObject(h),TObject(1)] := '1/27/2010 10:00:00 AM';
		CellValue[TObject(h),TObject(2)] := CellValue[TObject(h),TObject(1)];
		CellValue[TObject(h),TObject(3)] := TObject(1);
		CellValue[TObject(h),TObject(4)] := CellValue[TObject(h),TObject(3)];
		h := AddItem('1/27/2011');
		CellValue[TObject(h),TObject(1)] := '1/27/2011 9:00:00 AM';
		CellValue[TObject(h),TObject(2)] := CellValue[TObject(h),TObject(1)];
		CellValue[TObject(h),TObject(3)] := TObject(11);
		CellValue[TObject(h),TObject(4)] := CellValue[TObject(h),TObject(3)];
		h := AddItem('11/2/2010');
		CellValue[TObject(h),TObject(1)] := '11/2/2010 9:00:00 AM';
		CellValue[TObject(h),TObject(2)] := CellValue[TObject(h),TObject(1)];
		CellValue[TObject(h),TObject(3)] := TObject(2);
		CellValue[TObject(h),TObject(4)] := CellValue[TObject(h),TObject(3)];
	end;
	Columns.Item['DateTime'].DisplayFilterDate := False;
	EndUpdate();
end
1881:
Is there a way to set the time zone per item

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		h1 := AddItem('Task A');
		AddBar(h1,'','1/2/2001','1/18/2001','TZ1','Time Zone / Item');
		ItemBar[h1,'TZ1',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable] := TObject(False);
		ItemBar[h1,'TZ1',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor] := TObject(255);
		AddBar(h1,'Task','1/20/2001','1/29/2001','Z1',Nil);
		h1 := AddItem('Task B');
		AddBar(h1,'','1/6/2001','1/24/2001','TZ2','Time Zone / Item');
		ItemBar[h1,'TZ2',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable] := TObject(False);
		ItemBar[h1,'TZ2',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor] := TObject(65535);
		AddBar(h1,'Task','1/3/2001','1/12/2001','Z1',Nil);
	end;
	EndUpdate();
end
1880:
Is there a way to turn arrow-key-navigation between the items on and off
// KeyDown event - Occurs when the user presses a key while an object has the focus.
procedure TWinForm1.AxG2antt1_KeyDownEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_KeyDownEvent);
begin
	with AxG2antt1 do
	begin
		e.keyCode := 0;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (Columns.Add('Effort') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(21);
		Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
	end;
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 96;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 128;
		HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverload;
			HistogramCriticalValue := 3;
			ShowHistogramValues := 'value>3?255:1';
			HistogramItems := -11;
			HistogramGridLinesColor := $c0c0c0;
			HistogramRulerLinesColor := $10000;
			FormatHistogramValues := 'value format `2`';
		end;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/21/2005','6/23/2005',Nil,Nil);
		CellValue[TObject(h1),TObject(1)] := TObject(6.79);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task','6/24/2005','6/26/2005',Nil,Nil);
		CellValue[TObject(h1),TObject(1)] := TObject(3.19);
		h1 := AddItem('Task 3');
		AddBar(h1,'Task','6/27/2005','6/29/2005',Nil,Nil);
		CellValue[TObject(h1),TObject(1)] := TObject(2);
		h1 := AddItem('Task 4');
		AddBar(h1,'Task','6/30/2005','7/2/2005',Nil,Nil);
		CellValue[TObject(h1),TObject(1)] := TObject(1);
	end;
	EndUpdate();
end
1879:
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with (Columns.Add('P1') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	with (Columns.Add('P2') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
		FormatColumn := '1 index ``';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child A');
		InsertItem(h,Nil,'Child B');
		InsertItem(h,Nil,'Child A');
		InsertItem(h,Nil,'Child B');
		AddItem('Root');
		AddItem('Root');
	end;
	SingleSort := False;
	Layout := 'multiplesort="C0:1 C1:2";collapse=""';
	EndUpdate();
end
1878:
How can I decode the Layout property

with AxG2antt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		Add('C1');
		(Add('C2') as EXG2ANTTLib.Column).Position := 1;
	end;
	with Items do
	begin
		CellValue[TObject(AddItem('SubItem 1.1')),TObject(1)] := 'SubItem 1.2';
		CellValue[TObject(AddItem('SubItem 2.1')),TObject(1)] := 'SubItem 2.2';
	end;
	Columns.Item['C2'].SortOrder := EXG2ANTTLib.SortOrderEnum.SortDescending;
	EndUpdate();
	OutputDebugString( 'Encoded:' );
	OutputDebugString( Layout );
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		OutputDebugString( 'Decoded: ' );
		OutputDebugString( Decode64TextW[AxG2antt1.Layout] );
	end;
end
1877:
Is it possible to define a bar inside a bar (method 2)

with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
	end;
	with Items do
	begin
		h := AddItem('Tasks');
		AddBar(h,'Task','1/3/2001','1/7/2001','A1',Nil);
		AddBar(h,'Task','1/4/2001','1/8/2001','A2',Nil);
		AddBar(h,'Task','1/9/2001','1/13/2001','A3',Nil);
	end;
	with Chart.Notes do
	begin
		with Add('N1',TObject(AxG2antt1.Items.FirstVisibleItem),'A1','') do
		begin
			PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := ' ';
			PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
			PartFixedHeight[EXG2ANTTLib.NotePartEnum.exNoteStart] := 11;
			PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
			PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $ff00;
			PartVisible[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
			ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
			PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := 4;
		end;
	end;
	EndUpdate();
end
1876:
Is it possible to define a bar inside a bar (method 1)

with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
			OverlaidGroup := 'Task,TaskB';
		end;
		with Bars.Add('Aka') do
		begin
			Color := $ff00;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
		end;
		with Bars.Add('Task%Aka') do
		begin
			Shortcut := 'TaskB';
			OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
			OverlaidGroup := 'Task,TaskB';
		end;
	end;
	with Items do
	begin
		h := AddItem('Tasks');
		AddBar(h,'TaskB','1/3/2001','1/7/2001','A1',Nil);
		ItemBar[h,'A1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.25);
		AddBar(h,'Task','1/4/2001','1/8/2001','A2',Nil);
		AddBar(h,'Task','1/9/2001','1/13/2001','A3',Nil);
	end;
	EndUpdate();
end
1875:
How do I show the bar with a solid color, no border (method 1)

with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Color := $ff;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
		end;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Nil);
	end;
	EndUpdate();
end
1874:
How do I show the bar with a solid color, no border (method 2)

with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Color := $ff;
			StartColor := Color;
			EndColor := Color;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
		end;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Nil);
	end;
	EndUpdate();
end
1873:
How do I show the bar with a solid color, no border (method 3)

with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
	end;
	with VisualAppearance do
	begin
		RenderType := -1;
		Add(1,'gBFLBCJwBAEHhEJAAEhABJkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyDQKkEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5AcgPfKgAAFESNY5gSL5Yj' + 
	'2IjrRDCMAggI');
	end;
	with Chart.Bars.Item['Task'] do
	begin
		Color := $10000ff;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Nil);
	end;
	EndUpdate();
end
1872:
How do I find the cell's type, or what the cell holds

with AxG2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		(Add('Value') as EXG2ANTTLib.Column).Width := 24;
		(Add('Type') as EXG2ANTTLib.Column).FormatColumn := 'type(%0)';
		(Add('TypeAsString') as EXG2ANTTLib.Column).FormatColumn := '(0 := type(%0)) array (`empty`, `null`, `short`, `long`, `float`, `double`, `currency`, `date`, `string`, `object`, `error`, `bo' + 
	'olean`, `variant`, `any`, `reserved`, `decimal`, `char`, `byte`, `unsigned short`, `unsigned long`, `long on 64 bits`)';
		(Add('Length') as EXG2ANTTLib.Column).FormatColumn := 'len(%0)';
	end;
	with Items do
	begin
		AddItem(Nil);
		AddItem('');
		CellValue[TObject(.AddItem(Nil)),TObject(0)] := (AxG2antt1.GetOcx() as EXG2ANTTLib.G2antt);
		CellValue[TObject(AddItem(Nil)),TObject(0)] := TObject(True);
		CellValue[TObject(AddItem(Nil)),TObject(0)] := TObject(-1);
		CellValue[TObject(AddItem(Nil)),TObject(0)] := TObject(-1);
		CellValue[TObject(AddItem(Nil)),TObject(0)] := '1/1/2001';
	end;
	EndUpdate();
end
1871:
Is it possible to allow changing the bar's parent while bar's start/end margins should stay unchanged
// BarParentChange event - Occurs just before moving a bar from current item to another item.
procedure TWinForm1.AxG2antt1_BarParentChange(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEvent);
begin
	with AxG2antt1 do
	begin
		Items.SelectItem[e.newItem] := True;
		OutputDebugString( 'BarParentChange from ' );
		OutputDebugString( Items.CellCaption[TObject(e.item),TObject(0)] );
		OutputDebugString( ' to ' );
		OutputDebugString( Items.CellCaption[TObject(e.newItem),TObject(0)] );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	(Columns.Add('Members') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	with Chart do
	begin
		SelBackColor := AxG2antt1.SelBackColor;
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 96;
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize] := TObject(False);
		end;
	end;
	with Items do
	begin
		AddItem('Member <b>1</b>');
		h := AddItem('Member <b>2</b>');
		AddBar(h,'Task','9/21/2006','9/23/2006','T102','Task <b>102</b>');
		ItemBar[h,'T102',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove] := TObject(False);
		ItemBar[h,'T102',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother] := TObject(True);
		AddItem('Member <b>3</b>');
		AddItem('Member <b>4</b>');
	end;
	EndUpdate();
end
1870:
Is it possible to (un)highlight the day/night shifts

// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TWinForm1.AxG2antt1_ClickEvent(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		with Chart do
		begin
			ShowNonworkingDates := False;
			ShowNonworkingHours := False;
			BackColor := $ffffff;
		end;
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		UnitWidth := 64;
		PaneWidth[False] := 0;
		NonworkingHours := 15728895;
		NonworkingHoursPattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
		NonworkingDaysPattern := NonworkingHoursPattern;
		NonworkingHoursColor := $f0f0f0;
		NonworkingDaysColor := $d4d4d4;
		BackColor := $fafafa;
	end;
	EndUpdate();
end
1869:
How can I add a vertical line at specified date-time

with AxG2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 18;
		LevelCount := 2;
		UnitWidth := 32;
		FirstVisibleDate := '1/1/2010';
		MarkTimeZone('M1','1/5/2010','1/5/2010',TObject(16711680),'50:5;3');
		MarkTimeZone('M2','1/6/2010','1/6/2010',TObject(16711680),':5');
		MarkTimeZone('M3','1/7/2010 10:00:00 AM','1/7/2010 10:00:00 AM',TObject(255),'50:3;;zone');
	end;
end
1868:
How do I clear all date-time zones
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TWinForm1.AxG2antt1_ClickEvent(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Chart.RemoveTimeZone('<*>');
	end
end;

// RClick event - Fired when right mouse button is clicked
procedure TWinForm1.AxG2antt1_RClick(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Chart.RemoveTimeZone('<Z*>');
	end
end;

with AxG2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 18;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2010';
		MarkTimeZone('Z1','1/4/2010','1/5/2010',TObject(255),Nil);
		MarkTimeZone('Z2','1/11/2010','1/12/2010',TObject(65280),Nil);
		MarkTimeZone('M1','1/7/2010','1/8/2010',TObject(16711680),'50:5;3');
	end;
end
1867:
How do I place a comment above/bellow the bar (sample 4)

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 26;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption] := TObject(18);
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(0);
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := ' ';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(0);
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionVAlign] := TObject(16);
		end;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1','<font ;6>user comment');
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := '<font ;6>user comment';
		AddBar(h,'Task','1/9/2001','1/13/2001','K2','<font ;6>user comment');
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := '<font ;6>user comment';
	end;
	EndUpdate();
end
1866:
How do I place a comment above/bellow the bar (sample 3)

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 26;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1','<font ;6>user comment');
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption] := TObject(18);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(0);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := '<font ;6>user comment';
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(0);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionVAlign] := TObject(16);
		AddBar(h,'Task','1/9/2001','1/13/2001','K2','<font ;6>user comment');
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := '<font ;6>user comment';
	end;
	EndUpdate();
end
1865:
How do I place a comment under the bar (sample 2)

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 26;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption] := TObject(18);
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(0);
		end;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1','<font ;6>user comment');
		AddBar(h,'Task','1/9/2001','1/13/2001','K2','<font ;6>user comment');
	end;
	EndUpdate();
end
1864:
How do I place a comment under the bar (sample 1)

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 26;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1','<font ;6>user comment');
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption] := TObject(18);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(0);
		AddBar(h,'Task','1/9/2001','1/13/2001','K2','<font ;6>user comment');
	end;
	EndUpdate();
end
1863:
I am using exBarCanMoveToAnother to allow a bar to be moved from one item to another. The question is if it is possible somehow to highlight the current bar can be dropped to (sample 2)

// BarParentChange event - Occurs just before moving a bar from current item to another item.
procedure TWinForm1.AxG2antt1_BarParentChange(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEvent);
begin
	with AxG2antt1 do
	begin
		Items.SelectItem[e.newItem] := True;
		e.cancel := ConditionalFormats.Item['NOTRED'].Verify[e.newItem];
	end
end;

// ChartEndChanging event - Occurs after the chart has been changed.
procedure TWinForm1.AxG2antt1_ChartEndChanging(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEvent);
begin
	with AxG2antt1 do
	begin
		(GetOcx() as EXG2ANTTLib.G2antt).SelForeColor := $8000000e;
		(GetOcx() as EXG2ANTTLib.G2antt).SelBackColor := $8000000d;
		Chart.SelBackColor := AxG2antt1.SelBackColor;
		ConditionalFormats.Clear();
	end
end;

// ChartStartChanging event - Occurs when the chart is about to be changed.
procedure TWinForm1.AxG2antt1_ChartStartChanging(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEvent);
begin
	with AxG2antt1 do
	begin
		SelForeColor := ForeColor;
		SelBackColor := BackColor;
		with Chart do
		begin
			SelBackColor := BackColor;
		end;
		with ConditionalFormats.Add('%0 contains `Allowed` ','RED') do
		begin
			Enabled := False;
		end;
		with ConditionalFormats.Add('not ( %0 contains `Allowed` )','NOTRED') do
		begin
			BackColor := $1fefefe;
			ChartBackColor := BackColor;
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABZkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyDQKkEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUbyDBIGQSCCZYDmKA3fj' + 
	'0AI9P7FcgSABEEigNIxToOU4jFgeCR2TqQRK1BDQbQSFCaZrmMKIXICO40WBQFhTdLlRyBBKzLKtCyaBqWaZrWxZE72ZaFVTdOK6bDvGwoarid56X7beA2PgdZTjQi5c' + 
	'CxG5sLrTBZtYzfET3diOEYPQzHMpzDB7bxbGaXZBlGSZbjeGZBUjQc7yfSNMw/HqKZQ6cQwTAIgI');
	(Columns.Add('Members') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
	with Chart do
	begin
		SelBackColor := AxG2antt1.SelBackColor;
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		AllowSelectObjects := EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects;
		LevelCount := 2;
		PaneWidth[False] := 96;
		Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
	end;
	with Items do
	begin
		h := AddItem('Member <b>1</b>');
		h := AddItem('Member <b>Allowed</b>');
		AddBar(h,'Task','9/21/2006','9/23/2006','T102','Task <b>102</b>');
		ItemBar[h,'T102',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		ItemBar[h,'T102',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother] := TObject(True);
		h := AddItem('Member <b>Allowed</b>');
		h := AddItem('Member <b>4</b>');
	end;
	EndUpdate();
end
1862:
I am using exBarCanMoveToAnother to allow a bar to be moved from one item to another. The question is if it is possible somehow to highlight the current bar can be dropped to (sample 1)

// BarParentChange event - Occurs just before moving a bar from current item to another item.
procedure TWinForm1.AxG2antt1_BarParentChange(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEvent);
begin
	with AxG2antt1 do
	begin
		Items.SelectItem[e.newItem] := True;
		e.cancel := ConditionalFormats.Item['NOTRED'].Verify[e.newItem];
	end
end;

// ChartEndChanging event - Occurs after the chart has been changed.
procedure TWinForm1.AxG2antt1_ChartEndChanging(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEvent);
begin
	with AxG2antt1 do
	begin
		(GetOcx() as EXG2ANTTLib.G2antt).SelForeColor := $8000000e;
		(GetOcx() as EXG2ANTTLib.G2antt).SelBackColor := $8000000d;
		Chart.SelBackColor := AxG2antt1.SelBackColor;
		ConditionalFormats.Clear();
	end
end;

// ChartStartChanging event - Occurs when the chart is about to be changed.
procedure TWinForm1.AxG2antt1_ChartStartChanging(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEvent);
begin
	with AxG2antt1 do
	begin
		SelForeColor := ForeColor;
		SelBackColor := BackColor;
		with Chart do
		begin
			SelBackColor := BackColor;
		end;
		with ConditionalFormats.Add('%0 contains `Allowed` ','RED') do
		begin
			BackColor := $8080ff;
			ChartBackColor := BackColor;
		end;
		with ConditionalFormats.Add('not ( %0 contains `Allowed` )','NOTRED') do
		begin
			Enabled := False;
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	(Columns.Add('Members') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
	with Chart do
	begin
		SelBackColor := AxG2antt1.SelBackColor;
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		AllowSelectObjects := EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects;
		LevelCount := 2;
		PaneWidth[False] := 96;
		Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
	end;
	with Items do
	begin
		h := AddItem('Member <b>1</b>');
		h := AddItem('Member <b>Allowed</b>');
		AddBar(h,'Task','9/21/2006','9/23/2006','T102','Task <b>102</b>');
		ItemBar[h,'T102',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		ItemBar[h,'T102',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother] := TObject(True);
		h := AddItem('Member <b>Allowed</b>');
		h := AddItem('Member <b>4</b>');
	end;
	EndUpdate();
end
1861:
How can I check, if a specified item fits a specified conditional format expression
// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
	with AxG2antt1 do
	begin
		h := get_ItemFromPoint(-1,-1,c,hit);
		OutputDebugString( ConditionalFormats.Item['RED'].Verify[h] );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
	end;
	Chart.SelBackColor := AxG2antt1.SelBackColor;
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\VB\SAMPLE.MDB',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	with ConditionalFormats do
	begin
		with Add('%1 = 5','RED') do
		begin
			BackColor := $8080ff;
			ChartBackColor := BackColor;
		end;
	end;
	EndUpdate();
end
1860:
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 3)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	with Chart do
	begin
		SelBackColor := AxG2antt1.SelBackColor;
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\VB\SAMPLE.MDB',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	with ConditionalFormats do
	begin
		with Add('%1 in (3,5)',Nil) do
		begin
			ApplyToBars := 'Task';
			BarColor := $ff;
			BarOverviewColor := $ff;
			ForeColor := BarColor;
			Bold := True;
		end;
	end;
	EndUpdate();
end
1859:
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 2)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	with Chart do
	begin
		SelBackColor := AxG2antt1.SelBackColor;
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\VB\SAMPLE.MDB',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	with ConditionalFormats do
	begin
		with Add('%1 in (3,5)',Nil) do
		begin
			ApplyTo := EXG2ANTTLib.FormatApplyToEnum($1);
			BackColor := $8080ff;
		end;
		with Add('%1 in (3,5)',Nil) do
		begin
			ApplyToBars := 'Task';
			BarColor := $ff;
			BarOverviewColor := $ff;
			ChartBackColor := $8080ff;
		end;
	end;
	EndUpdate();
end
1858:
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 1)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
	end;
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	BackColorAlternate := Color.FromArgb(240,240,240);
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\VB\SAMPLE.MDB',3,3,Nil);
	end;
	Chart.SelBackColor := AxG2antt1.SelBackColor;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	with ConditionalFormats do
	begin
		with Add('%1 in (3,5)',Nil) do
		begin
			ApplyToBars := 'Task';
			BarColor := $ff;
			BarOverviewColor := $ff;
			BackColor := $8080ff;
			ChartBackColor := $8080ff;
		end;
	end;
	EndUpdate();
end
1857:
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event - Occurs when the OLEDrag method is called.
procedure TWinForm1.AxG2antt1_OLEStartDrag(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_OLEStartDragEvent);
begin
	// Data.SetData("data to drag")
	with AxG2antt1 do
	begin
		e.allowedEffects := 1;
	end
end;

with AxG2antt1 do
begin
	OLEDropMode := EXG2ANTTLib.exOLEDropModeEnum.exOLEDropManual;
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exDragDropAfter,$ffffff);
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
end
1856:
How do I change the visual appearance of the split bars

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 24;
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABEgDg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGMYhTgmFgAQhFcZQSB0Eg1BKMYwjOJgFgmEQxDQNIBQSLIYQiGSWZBGUBJDjWGgyQjOEByDI' + 
	'MRwjE6UZBgeCRViEMo9RrSEZSLAdGRFAaVYDdULBEACU5VRZQFCwTQcBhpIyoZpkECobh2TYgQjYNT1NSkLxeGoSbbuGhBQrOAw1XTEMhyDR0LTJM6bMBACqrBi2L4xU' + 
	'RfOBRXLQAYbHjAZ7rSgacjKRpKRbmAV4Oh+O5pQjadp1TidNwHLoAK7nGwbbgmfwAZrAdjABj1HgBNS2dDkaabQrKEZ4XYAHAXVROOQTWIANb2XC4bwSLAwTJJYzjThi' + 
	'C2GInFOOQckiVw6AeCIvHSBzkCwDxfE6WZ2jsehICadx5kGYZdDgMRrA2c4NmWY56jyGxgEQJIgGkGJHEGVByBkWoCjkNAAAQIQ2AYRoDGQJAoKuZYgBgRZHggHZqAkA' + 
	'ZDjYGA7E8KB0kyB5LiiBgigiYhIgiQ4Jk4WIkn6CphjQDgbDmIwDBIMg3GMQ4uDaDZjgiZg6DIY5DGIPg/GQBAMneEJMFkFJqhGTppCYSoSmSSQ2EoPJlAMIhSDmZREA' + 
	'yVYVk0eRkm+FpkmkdhehaTp4iSZQxiYRAODIMQODmJJxhqTwJjYbobmcCZGHKGxLjmVQDC+J4DiYeg8GGWYuH6H5oAoBoCgcTwimaBodmeGZongPRPCoCoOiOZ5qBIIo' + 
	'iAuaZomkPoPGOToEiaaZKHaHYfiUA5OhMAAngoVh6iYKYqHqKoqmGWoGiOKRkHOKJ7D2TxKgaNotmuCpmFAPQrkqPh4iwaw6laOowmwOpwnSL4LmiXJ9D4TxbBqTozm0' + 
	'CxGjwPRtEsIJsjWT4Dlydo1C2Sx2l6N5uAOWpijIDpbhYQ42i4K4mmqOpukuMpnjIJIjmKco5m8S5WnaPZkDuSJ4h0S46FKcY8m+DAHAGPovkoUhgD4cILmsCpCnCTA2' + 
	'nKQgPhwFokh4JpjmsFpEDGDBnBqRpwgwWJ6kSKhZjie5FnGTIXCWR4yAmYh+D+D48g8HpLnMDJHDIPoylObwpWIY5/CyTJzkydw1kSIhzA6ZQ7E+fJrDWUZ0g0JxKksT' + 
	'5NDSPJTmUaRcmAN5Nn0FJ/lMdYNGcWpWnWHRaGAMZ2AQDoEDKNhLicVpViQDYnGqWpPl2HxFDQNwJgoLoGGaCcDInRdjMCuNYbovR2D2FyNgNIcAJC5FWKwNwcBqAzCW' + 
	'BoPgTA8BkEwFwN4HRjjyAMH8EgcQ5CaGIFoAAHQ3AgAAIAQBAQ==');
		Add(2,'gBFLBCJwBAEHhEJAAEhABBYDg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGMYhTgmFgAQhFcZQSB0Eg1BKMYwjOJgFgmEQxDQNIBQSLIYQiGSWZTgMYRSASI43RoMUIzVA' + 
	'cQxDEaIZLlGQYHgkNIhDJPcZ0VDUbQGBiQIRmIAHNBwJJUVZFdBDLQkQy5HapZDkECobA+CZQTzUUI1LS9WS1HYaRJle4YRDUMJyQjdV4TRINHQvMinYzqOzrOhaW5TS' + 
	'zLcqyCK0SxxR4AJ4yGobJjiQYJShXcxyDQ8dyZC7PQohG7ofxUAKDVjhMjZRQeMS9JCwaThHElRQHMyBdJkKA9Iq2WaGXBeeQ3JbNbzrYzHb5hHZgAzTOoWbzWFT8BJO' + 
	'FOCAYGcJJjHGTh+C2H40AAL5ckyBQDFkKoWHYLw9iGTpGDUY4zkIdwbF8JhbgMc5hF6OJ8C6BhTkOcBAlsR4NnQaAflAIQJBQBoRgwdAdEcIYVEUQJBGYOBCBMYQUGgN' + 
	'hCEKB5FB4VBBgQXJgF+IAzA4Ig5GIQIQBwOxiGiIgngoYpIi4LoKiMA5KDIMwjEKakmk6OJkkmDpNgidgtgwI55AYJw5iQQwSEYNxkgiZJrEITppDSc4TkyCREmeFJkC' + 
	'kAkLmWAwWFoOolkkNheDuJJJDSb4YmIQ4UkaGZlFkVJVhqTR5jYYw7mWeQ1AkPAnEmVh1C6Z4JiYL4KGQYwQmOH5PBoBh2h0EIaAaBg8GMI5Ij6IpokoNoOiOaJDiaEo' + 
	'iA8KgegGIRpGoZoaiaaZDmCdYlGkZAmgmKJqEqFomimaoKCaIoqGqSo2iwQhknqRoyiyaxKlaNotk8OpCjiLprkqbQJD0LALAaQowmwSwWkaMZQhOVpKjKbJLDaTozm0' + 
	'CxFAkPYtEsVpWjWbYLGaWo2lCGRil6N5pAuBpiDsbhLH6Zo3G4ax6HhYgpFibYjCWa4ml4QhPguVp2D4b4Li6bYPmiSZWngPhvGuWQJj+b5zmsBo+iePAmDCIwoGwGJ6' + 
	'kEL4MA8EJDjCC46FWQwoBObwGkQD4UCcDpDg+PIHBWPpiHwYJxD+MgcH8BpH4cBJ7kicIrnKC4hg+fIjCoPoQhyOwuD8M5CnMPpJCMCIIkOOQOlOfw1k6MnJDwPw0GOf' + 
	'hvDGdQNAIKdalOAJfDedJdC8SxCeyNJQleZhdEoJ4iEyLYWlWVx0GQJJslqTQtjcVJYi6aZ8mMM43EmFwCECJkfYyWiDuAuG0EgdBNB8AYHYMgxwEM1EAIAgIA==');
		Add(3,'CP:2 -2 -2 2 2');
	end;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		with Bars do
		begin
			with Add('A') do
			begin
				Height := 15;
				Color := $2000000;
				Pattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
			end;
			with Add('Task:A') do
			begin
				Shortcut := 'Task';
				Height := 15;
				Color := $1000000;
				Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
			end;
		end;
		NonworkingDaysColor := $f0f0f0;
		SelBarColor := $ff0000;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/16/2001',Nil,Nil);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/2/2001','1/16/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65535);
		h := AddItem('Task 3');
		AddBar(h,'Task','1/2/2001','1/16/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
		h := AddItem('Task 4');
		AddBar(h,'Task','1/2/2001','1/16/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarNonWorkingColor] := TObject(58753152);
		h := AddItem('Task 5');
		AddBar(h,'Task','1/2/2001','1/16/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarNonWorkingColor] := TObject(25198720);
		h := AddItem('Task 6');
		AddBar(h,'Task','1/2/2001','1/16/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarNonWorkingColor] := TObject(2130771712);
	end;
	EndUpdate();
end
1855:
Is there a way to display automatically the duration ( days, hours, minutes ) of the bar next to it

with AxG2antt1 do
begin
	BeginUpdate();
	with (Columns.Add('Tasks') as EXG2ANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 36;
	end;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		PaneWidth[False] := 64;
		FirstVisibleDate := '4/6/2009';
		LevelCount := 2;
		with Bars.Add('Task:Progress') do
		begin
			Shortcut := 'TaskS';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=((1:=int(0:= (%258))) != 0 ? (=:1 + '' day(s)'') : '''') + (=:1 ? '' '' : '''' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0' + 
	' ? =:1 + '' hour(s)'' : '''' ) + (=:1 ? '' '' : '''' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + '' min(s)'' : '''')%>';
		end;
		ResizeUnitScale := EXG2ANTTLib.UnitEnum.exMinute;
	end;
	with Items do
	begin
		AddBar(AddItem('T1'),'TaskS','4/10/2009 2:30:00 AM','4/16/2009 2:30:00 AM',Nil,Nil);
		AddBar(AddItem('T2'),'TaskS','4/14/2009 9:00:00 AM','4/22/2009 10:10:00 AM',Nil,Nil);
		ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
		ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
	end;
	EndUpdate();
end
1854:
Is there a way to display automatically the duration ( days, hours, minutes ) of the bar next to it

with AxG2antt1 do
begin
	BeginUpdate();
	with (Columns.Add('Tasks') as EXG2ANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 36;
	end;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		PaneWidth[False] := 64;
		FirstVisibleDate := '4/6/2009';
		LevelCount := 2;
		UnitScale := EXG2ANTTLib.UnitEnum.exHour;
		ResizeUnitScale := EXG2ANTTLib.UnitEnum.exMinute;
		Bars.Item['Task'].Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=((1:=int(0:= (%513))) != 0 ? (=:1 + '' day(s)'') : '''') + (=:1 ? '' '' : '''' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0' + 
	' ? =:1 + '' hour(s)'' : '''' ) + (=:1 ? '' '' : '''' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + '' min(s)'' : '''')%>';
	end;
	with Items do
	begin
		AddBar(AddItem('T1'),'Task','4/6/2009 2:30:00 AM','4/6/2009 12:35:00 PM',Nil,Nil);
		AddBar(AddItem('T2'),'Task','4/6/2009 9:00:00 AM','4/6/2009 10:10:00 AM',Nil,Nil);
		ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
	end;
	EndUpdate();
end
1853:
Does it support single or multiple split pane views

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,$808080);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,$282828);
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 76;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Summary'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternShadow;
			Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown;
			Color := $ff0000;
			StartColor := Color;
			EndColor := Color;
		end;
		AllowSplitPane := Integer(EXG2ANTTLib.AllowSplitPaneEnum.exAllowTwoSplitPane) Or Integer(EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane);
		SplitPaneWidth := '128,128';
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Nil);
		hTask := InsertItem(hSummary,Nil,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTask := InsertItem(hSummary,Nil,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Nil);
		hTask := InsertItem(hSummary,Nil,'Task C');
		AddBar(hTask,'Task','2/23/2001','2/27/2001','K3',Nil);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	EndUpdate();
end
1852:
How can I programmatically add more split panes ( by code)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,$808080);
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 76;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Summary'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternShadow;
			Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown;
			Color := $ff0000;
			StartColor := Color;
			EndColor := Color;
		end;
		AllowSplitPane := EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Nil);
		hTask := InsertItem(hSummary,Nil,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTask := InsertItem(hSummary,Nil,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Nil);
		hTask := InsertItem(hSummary,Nil,'Task C');
		AddBar(hTask,'Task','2/23/2001','2/27/2001','K3',Nil);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	with Chart do
	begin
		ScrollTo(EndPrintDate,TObject(1));
		SplitPaneWidth := '128,128,128';
		ScrollTo(StartPrintDate,TObject(1));
	end;
	EndUpdate();
end
1851:
How can I programmatically add a split pane, or adding a split view at runtime

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,$282828);
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 76;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Summary'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternShadow;
			Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown;
			Color := $ff0000;
			StartColor := Color;
			EndColor := Color;
		end;
		AllowSplitPane := EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Nil);
		hTask := InsertItem(hSummary,Nil,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTask := InsertItem(hSummary,Nil,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Nil);
		hTask := InsertItem(hSummary,Nil,'Task C');
		AddBar(hTask,'Task','2/23/2001','2/27/2001','K3',Nil);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	with Chart do
	begin
		ScrollTo(EndPrintDate,TObject(1));
		SplitPaneWidth := '128';
		ScrollTo(StartPrintDate,TObject(1));
	end;
	EndUpdate();
end
1850:
Is there any way, property, procedure or anything else to split the control into multiple views

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,$282828);
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 76;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Summary'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternShadow;
			Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown;
			Color := $ff0000;
			StartColor := Color;
			EndColor := Color;
		end;
		AllowSplitPane := EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Nil);
		hTask := InsertItem(hSummary,Nil,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTask := InsertItem(hSummary,Nil,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Nil);
		hTask := InsertItem(hSummary,Nil,'Task C');
		AddBar(hTask,'Task','2/23/2001','2/27/2001','K3',Nil);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	EndUpdate();
end
1849:
It appears that I can not use the ItemFromPoint property in my environment. What else I can do

// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( ExecuteTemplate('Dim c, hit; ItemFromPoint(-1,-1, c, hit )') );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with (Columns.Add('Default') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	Chart.PaneWidth[True] := 0;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1848:
How can I change the color for selected links (ebn)

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		RenderType := -2;
		Add(1,'gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZBi' + 
	'OEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6rY' + 
	'zuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Txx' + 
	'gGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4F' + 
	'4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA==');
		Add(2,'CP:1 -2 -2 2 2');
	end;
	DefaultItemHeight := 24;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		NonworkingDays := 0;
		LinksStyle := EXG2ANTTLib.LinkStyleEnum.exLinkSolid;
		LinksWidth := 2;
		SelLinkColor := $20000ff;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/4/2001','',Nil);
		AddLink('L1',h1,'',h2,'');
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkSelected] := TObject(True);
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/2/2001','1/4/2001','',Nil);
		AddLink('L2',h2,'',h3,'');
		SchedulePDM(0,'');
	end;
	EndUpdate();
end
1847:
How can I change the color for selected links (color, no frame)

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 24;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		NonworkingDays := 0;
		LinksStyle := EXG2ANTTLib.LinkStyleEnum.exLinkSolid;
		LinksWidth := 2;
		SelLinkColor := $7f0000ff;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/4/2001','',Nil);
		AddLink('L1',h1,'',h2,'');
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkSelected] := TObject(True);
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/2/2001','1/4/2001','',Nil);
		AddLink('L2',h2,'',h3,'');
		SchedulePDM(0,'');
	end;
	EndUpdate();
end
1846:
How can I change the color for selected links (color, frame)

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 24;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		NonworkingDays := 0;
		LinksStyle := EXG2ANTTLib.LinkStyleEnum.exLinkSolid;
		LinksWidth := 2;
		SelLinkColor := $ff;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/4/2001','',Nil);
		AddLink('L1',h1,'',h2,'');
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkSelected] := TObject(True);
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/2/2001','1/4/2001','',Nil);
		AddLink('L2',h2,'',h3,'');
		SchedulePDM(0,'');
	end;
	EndUpdate();
end
1845:
By default, the bar gets selected once the user releases the button of the mouse. Is it possible to change this behavior so the bar gets selected once the user presses the button of the mouse
// MouseDown event - Occurs when the user presses a mouse button.
procedure TWinForm1.AxG2antt1_MouseDownEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseDownEvent);
begin
	with AxG2antt1 do
	begin
		h := get_ItemFromPoint(-1,-1,c,hit);
		b := Chart.BarFromPoint[-1,-1];
		with Items do
		begin
			ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(False);
			ItemBar[h,TObject(b),EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 32;
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZBi' + 
	'OEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6rY' + 
	'zuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Txx' + 
	'gGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4F' + 
	'4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA==');
		Add(2,'CP:1 -2 -2 2 2');
	end;
	with Chart do
	begin
		AllowSelectObjects := EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects;
		FirstVisibleDate := '1/1/2002';
		SelBarColor := $2000000;
		PaneWidth[False] := 48;
	end;
	Columns.Add('Task');
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2002','1/4/2002','A',Nil);
		AddBar(h,'Task','1/6/2002','1/10/2002','B',Nil);
		AddBar(h,'Task','1/11/2002','1/14/2002','C',Nil);
		ItemBar[h,'B',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
	end;
	EndUpdate();
end
1844:
How can I change the bar's color (sample 3, ebn, individual, global)

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		RenderType := -2;
		Add(1,'gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHI' + 
	'ERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6S' + 
	'TCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpF' + 
	'HIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQhaX' + 
	'QIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC');
		Add(2,'gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh' + 
	'+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa' + 
	'ZACj4arKejrRDCMAggI=');
	end;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Color := $1000000;
		end;
		with Bars.Item['Summary'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Color := $2000000;
		end;
	end;
	with Items do
	begin
		hSummaryJ := AddItem('Summary A');
		AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J',Nil);
		hTaskJ := InsertItem(hSummaryJ,Nil,'Task A.1');
		AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1',Nil);
		hTaskJ := InsertItem(hSummaryJ,Nil,'Task A.2');
		AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2',Nil);
		DefineSummaryBars(hSummaryJ,'J',-1,'<*>');
		hSummaryK := AddItem('Summary B');
		AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Nil);
		hTaskK := InsertItem(hSummaryK,Nil,'Task B.1');
		AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTaskK := InsertItem(hSummaryK,Nil,'Task B.2');
		AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Nil);
		DefineSummaryBars(hSummaryK,'K',-1,'<*>');
		ItemBar[0,'<K*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
1843:
How can I change the bar's color (sample 2, global)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Color := $ff;
		end;
		with Bars.Item['Summary'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Color := $ff;
			StartColor := Color;
			EndColor := Color;
		end;
	end;
	with Items do
	begin
		hSummaryJ := AddItem('Summary A');
		AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J',Nil);
		hTaskJ := InsertItem(hSummaryJ,Nil,'Task A.1');
		AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1',Nil);
		hTaskJ := InsertItem(hSummaryJ,Nil,'Task A.2');
		AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2',Nil);
		DefineSummaryBars(hSummaryJ,'J',-1,'<*>');
		hSummaryK := AddItem('Summary B');
		AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Nil);
		hTaskK := InsertItem(hSummaryK,Nil,'Task B.1');
		AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTaskK := InsertItem(hSummaryK,Nil,'Task B.2');
		AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Nil);
		DefineSummaryBars(hSummaryK,'K',-1,'<*>');
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
1842:
How can I change the bar's color (sample 1, individual)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Task'].Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		Bars.Item['Summary'].Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
	end;
	with Items do
	begin
		hSummaryJ := AddItem('Summary A');
		AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J','  (default)');
		hTaskJ := InsertItem(hSummaryJ,Nil,'Task A.1');
		AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1','(default)');
		hTaskJ := InsertItem(hSummaryJ,Nil,'Task A.2');
		AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2','(default)');
		DefineSummaryBars(hSummaryJ,'J',-1,'<*>');
		hSummaryK := AddItem('Summary B');
		AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Nil);
		hTaskK := InsertItem(hSummaryK,Nil,'Task B.1');
		AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTaskK := InsertItem(hSummaryK,Nil,'Task B.2');
		AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Nil);
		DefineSummaryBars(hSummaryK,'K',-1,'<*>');
		ItemBar[hSummaryK,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		ItemBar[0,'<K*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
1841:
How do I make the control read-only (method 2)

// Edit event - Occurs just before editing the focused cell.
procedure TWinForm1.AxG2antt1_EditEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_EditEvent);
begin
	with AxG2antt1 do
	begin
		e.cancel := True;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with (Columns.Add('Editor') as EXG2ANTTLib.Column).Editor do
	begin
		EditType := EXG2ANTTLib.EditTypeEnum.CheckListType;
		AddItem(1,'One',Nil);
		AddItem(2,'Two',Nil);
	end;
	with (Columns.Add('Check') as EXG2ANTTLib.Column) do
	begin
		with Editor do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType;
			Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue1] := TObject(2);
		end;
	end;
	with Items do
	begin
		CellValue[TObject(AddItem(TObject(1))),TObject(1)] := TObject(0);
		CellValue[TObject(AddItem(TObject(2))),TObject(1)] := TObject(1);
	end;
	EndUpdate();
end
1840:
How do I make the control read-only (method 1)

with AxG2antt1 do
begin
	BeginUpdate();
	ReadOnly := EXG2ANTTLib.ReadOnlyEnum.exReadOnly;
	with (Columns.Add('Editor') as EXG2ANTTLib.Column).Editor do
	begin
		EditType := EXG2ANTTLib.EditTypeEnum.CheckListType;
		AddItem(1,'One',Nil);
		AddItem(2,'Two',Nil);
	end;
	with (Columns.Add('Check') as EXG2ANTTLib.Column) do
	begin
		with Editor do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType;
			Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue1] := TObject(2);
		end;
	end;
	with Items do
	begin
		CellValue[TObject(AddItem(TObject(1))),TObject(1)] := TObject(0);
		CellValue[TObject(AddItem(TObject(2))),TObject(1)] := TObject(1);
	end;
	EndUpdate();
end
1839:
The ReadOnly property does not prevent changing the column's check-box (sample 2)

with AxG2antt1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	with (Columns.Add('C1') as EXG2ANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 18;
		Editor.EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType;
	end;
	Columns.Add('C2');
	with Items do
	begin
		CellValue[TObject(AddItem(TObject(0))),TObject(1)] := 'Item 1';
		CellValue[TObject(AddItem(TObject(-1))),TObject(1)] := 'Item 2';
		CellValue[TObject(AddItem(TObject(0))),TObject(1)] := 'Item 3';
	end;
	ReadOnly := EXG2ANTTLib.ReadOnlyEnum.exReadOnly;
	Columns.Item[TObject(0)].Editor.Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(2);
	EndUpdate();
end
1838:
The ReadOnly property does not prevent changing the column's check-box (sample 1)

with AxG2antt1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	with (Columns.Add('C1') as EXG2ANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 18;
		with Editor do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType;
			Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1);
		end;
	end;
	Columns.Add('C2');
	with Items do
	begin
		CellValue[TObject(AddItem(TObject(0))),TObject(1)] := 'Item 1';
		CellValue[TObject(AddItem(TObject(-1))),TObject(1)] := 'Item 2';
		CellValue[TObject(AddItem(TObject(0))),TObject(1)] := 'Item 3';
	end;
	ReadOnly := EXG2ANTTLib.ReadOnlyEnum.exReadOnly;
	EndUpdate();
end
1837:
How can I change the visual appearance of the control's split bar (sample 3)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABPsIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGUQxCKIZhzEgYRokAYYRDIMg5SBIETzFIMCQ9AaaJpieRJGi' + 
	'iKoJSxHErgFD8QxzEKOZqnCapViAMpOAZQAwDAIoWhpKKBRhqOpRUhaID/WAAFCUZK4ASTDCyLRgNy4lACgI');
		Add(2,'gBFLBCJwBAEHhEJAAEhABPkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGUQxCKIZhzEgYRoiEYhXDiIAxARHcgyBIMPQJGSaZpkSRpIi' + 
	'qHItS6BM4RVKkcw7G6BaJnGJpADKTQGQiMIwDAIoWhpKCBaiqSpqMglf5fg6pOJqHACZZKWLNLpxDBMAkBA=');
		Add(3,'gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGQCwTCIYhmHKSRhGSIRSDcOIgDCBEbyDIEQw9AiZZqmaRZHi' + 
	'mK4cS5MEhwHKsLSLGyOZwoSapbgmJooU5KUwSYKQcxBI6laYpIAKJhiWobTxUEBwMKlJw5KoBJxjKqIbp2XZsUxIAxXEA1HBgGASRZGS5bDreeQ0UZCL74GAFUy/Liba' + 
	'6weqnLhGCYBgIA==');
	end;
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,$1808080);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exHSplitBar,$2808080);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,$3010101);
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 64;
		HistogramVisible := True;
		HistogramHeight := 64;
		OverviewHeight := 48;
		OverviewVisible := EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAll;
	end;
	EndUpdate();
end
1836:
How can I change the color for the control's split bar (sample 2)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,$bebebe);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exHSplitBar,$808080);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,$10000);
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 64;
		HistogramVisible := True;
		HistogramHeight := 64;
		OverviewHeight := 48;
		OverviewVisible := EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAll;
	end;
	EndUpdate();
end
1835:
How do I highlight a bar with an icon, exclamation mark or some warning sign, without using exBarCaption, exBarExtraCaption which I've already use for something else ( sample 2 )

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '12/26/2000';
		PaneWidth[False] := 128;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('');
		h := AddItem('Item');
		AddItem('');
		AddBar(h,'Task','1/1/2001','1/13/2001','A',Nil);
	end;
	with Chart.Notes do
	begin
		with Add('Attention',TObject(AxG2antt1.Items.ItemByIndex[1]),'A',' <font ;11>! ') do
		begin
			RelativePosition := TObject(0.5);
			ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
			PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 0;
			PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
			PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteEnd] := $ffff;
		end;
	end;
	EndUpdate();
end
1834:
How do I highlight a bar with an icon, exclamation mark or some warning sign, without using exBarCaption, exBarExtraCaption which I've already use for something else ( sample 1 )

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '12/26/2000';
		PaneWidth[False] := 128;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('');
		h := AddItem('Item');
		AddItem('');
		AddBar(h,'Task','1/1/2001','1/13/2001','A',Nil);
		ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := '[text=`<bgcolor=FFFF00><font ;11> ! `,align=0x11]';
		ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := TObject(8);
	end;
	EndUpdate();
end
1833:
How do I get the "Summary" bar being shown in the control's histogram (sample 2)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh' + 
	'+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa' + 
	'ZACj4arKejrRDCMAggI=');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistCumulative;
			HistogramCumulativeOriginalColorBars := EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor;
		end;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Task','1/2/2001','1/2/2001','',Nil);
		ItemBar[hSummary,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16777216);
		hTask := InsertItem(hSummary,Nil,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTask := InsertItem(hSummary,Nil,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Nil);
		hTask := InsertItem(hSummary,Nil,'Task C');
		AddBar(hTask,'Task','1/12/2001','1/17/2001','K3',Nil);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	EndUpdate();
end
1832:
How do I get the "Summary" bar being shown in the control's histogram (sample 1)

with AxG2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh' + 
	'+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa' + 
	'ZACj4arKejrRDCMAggI=');
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
		end;
		with Bars.Item['Summary'] do
		begin
			Color := $1000000;
			HistogramColor := $10000;
			HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
		end;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Nil);
		hTask := InsertItem(hSummary,Nil,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTask := InsertItem(hSummary,Nil,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Nil);
		hTask := InsertItem(hSummary,Nil,'Task C');
		AddBar(hTask,'Task','1/12/2001','1/17/2001','K3',Nil);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
	end;
	EndUpdate();
end
1831:
How can I temporarily/programmatically hide the control's tooltip

// RClick event - Fired when right mouse button is clicked
procedure TWinForm1.AxG2antt1_RClick(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		nToolTipDelay := ToolTipDelay;
		ToolTipDelay := 0;
		ToolTipDelay := nToolTipDelay;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	(Columns.Add('Column w/h tooltip...') as EXG2ANTTLib.Column).ToolTip := 'This is a bit of text that''s shown when the cursor hovers the column.<br><br><sha ;;0><c>Right-Click to hide it</sha>';
	with Chart do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
		LevelCount := 2;
		PaneWidth[False] := 128;
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
	end;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	BackColorLevelHeader := BackColor;
	EndUpdate();
end
1830:
Is it possible to find out the handle of the item, giving the key of the bar only

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	DefaultItemHeight := 32;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 64;
		Bars.Item['Task'].Height := 16;
		FirstVisibleDate := '1/1/2001';
		ShowLinks := EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil);
		AddBar(AddItem('Task 2'),'Task','1/5/2001','1/7/2001','K2',Nil);
		ItemBold[ItemBar[0,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarParent]] := True;
	end;
	EndUpdate();
end
1829:
How can I programmatically add a link between two bars, knowing the keys of these bars only

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	DefaultItemHeight := 32;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 64;
		Bars.Item['Task'].Height := 16;
		FirstVisibleDate := '1/1/2001';
		ShowLinks := EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/5/2001','1/7/2001','AK2',Nil);
		AddLink('Link1',0,'K1',0,'AK2');
		AddLink('Link2',0,'K1',0,'<A?2>');
		AddLink('Link3',0,'<*1>',0,'AK2');
	end;
	EndUpdate();
end
1828:
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exSolidLine;
	Indent := 16;
	MarkSearchColumn := False;
	with Columns do
	begin
		with (Add('') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
			FormatColumn := '((1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		CellState[TObject(hChild),TObject(0)] := 1;
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
	end;
	EndUpdate();
end
1827:
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	GridLineColor := Color.FromArgb(190,190,190);
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exSolidLine;
	Indent := 16;
	with Columns do
	begin
		Add('Default');
		with (Add('') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingRight] := TObject(4);
			AllowSizing := False;
			Width := 36;
			Position := 0;
			FormatColumn := '(1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:' + 
	'1) ) ';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		CellState[TObject(hChild),TObject(0)] := 1;
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
	end;
	EndUpdate();
end
1826:
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exSolidLine;
	Indent := 16;
	with Columns do
	begin
		Add('Default');
		with (Add('') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingRight] := TObject(4);
			Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
			AllowSizing := False;
			Width := 24;
			Position := 0;
			FormatColumn := '(1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) ';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Nil,'Child');
		hChild := InsertItem(h,Nil,'Child');
		CellState[TObject(hChild),TObject(0)] := 1;
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(hChild,Nil,'Child');
		InsertItem(h,Nil,'Child');
	end;
	EndUpdate();
end
1825:
How can I programmatically group by columns, without having the control's sort bar visible

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SortBarHeight := 0;
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Layout := 'multiplesort="C1:2"';
	EndUpdate();
end
1824:
How do I perform my own sort

// Sort event - Fired when the control sorts a column.
procedure TWinForm1.AxG2antt1_Sort(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( 'Sort' );
		with Items do
		begin
			ItemPosition[ItemByIndex[1]] := 0;
			ItemPosition[ItemByIndex[0]] := 1;
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	SingleSort := False;
	SortOnClick := EXG2ANTTLib.SortOnClickEnum.exUserSort;
	with Columns do
	begin
		(Add('Index') as EXG2ANTTLib.Column).FormatColumn := '0 index ``';
		Add('Data 1');
		Add('Data 2');
	end;
	with Items do
	begin
		h := AddItem(TObject(0));
		CellValue[TObject(h),TObject(1)] := TObject(2);
		CellValue[TObject(h),TObject(2)] := TObject(3);
		h := AddItem(TObject(4));
		CellValue[TObject(h),TObject(1)] := TObject(5);
		CellValue[TObject(h),TObject(2)] := TObject(6);
		h := AddItem(TObject(7));
		CellValue[TObject(h),TObject(1)] := TObject(8);
		CellValue[TObject(h),TObject(2)] := TObject(9);
	end;
	Layout := 'multiplesort="C1:1 C2:2"';
	EndUpdate();
end
1823:
Is it possible to have a different alignment for parts of the cell's caption

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := True;
	TreeColumnIndex := -1;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	with (Columns.Add('Default') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
	end;
	with Items do
	begin
		CellHAlignment[TObject(AddItem('all-left')),TObject(0)] := EXG2ANTTLib.AlignmentEnum.LeftAlignment;
		CellHAlignment[TObject(AddItem('all-center')),TObject(0)] := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
		CellHAlignment[TObject(AddItem('all-right')),TObject(0)] := EXG2ANTTLib.AlignmentEnum.RightAlignment;
		h := AddItem('left<c>center<r>right');
		CellValueFormat[TObject(h),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
	end;
	EndUpdate();
end
1822:
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		with (Add('MultipleLine') as EXG2ANTTLib.Column) do
		begin
			Width := 32;
			Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
			Def[EXG2ANTTLib.DefColumnEnum.exColumnResizeContiguously] := TObject(True);
		end;
		with (Add('SingleLine') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
		end;
	end;
	with Items do
	begin
		CellValue[TObject(AddItem('This is a bit of long text that should break the line')),TObject(1)] := 'This is a bit of long text that should break the line';
	end;
	EndUpdate();
end
1821:
Is there an other way to detect if a bar is overlapping any other bar

// BarResizing event - Occurs when a bar is moving or resizing.
procedure TWinForm1.AxG2antt1_BarResizing(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	BackColorLevelHeader := BackColor;
	DefaultItemHeight := 22;
	Columns.Add('Task');
	with (Columns.Add('Intersect / Count') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := 'A';
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(521);
		LevelKey := TObject(1);
	end;
	with (Columns.Add(' / With') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := 'A';
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(520);
		LevelKey := TObject(1);
	end;
	Items.AllowCellValueToItemBar := True;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 148;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset;
			OverlaidGroup := 'TaskB';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(16);
		end;
		with Bars.Add('TaskB') do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		end;
	end;
	with Items do
	begin
		h := AddItem('A');
		AddBar(h,'Task','1/2/2001','1/4/2001','A','A');
		AddBar(h,'TaskB','1/3/2001','1/5/2001','B','B');
		h := AddItem('A');
		AddBar(h,'Task','1/6/2001','1/9/2001','A','A');
		AddBar(h,'TaskB','1/10/2001','1/13/2001','B','B');
		h := AddItem('A');
		AddBar(h,'TaskB','1/6/2001','1/9/2001','B1','B1');
		AddBar(h,'Task','1/10/2001','1/13/2001','A','A');
		AddBar(h,'TaskB','1/10/2001','1/13/2001','B2','B2');
		h := AddItem('A');
		AddBar(h,'Task','1/8/2001','1/11/2001','B1','B1');
		AddBar(h,'Task','1/10/2001','1/13/2001','A','A');
		AddBar(h,'Task','1/12/2001','1/15/2001','B2','B2');
	end;
	EndUpdate();
end
1820:
How can I get the absolute position of an item
// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task','1/2/2017','1/5/2017',Nil,Nil);
		end;
	end
end;

// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			OutputDebugString( CellCaption[TObject(AxG2antt1.ItemFromPoint[-1,-1,c,hit]),'Position'] );
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2017';
	end;
	BackColorLevelHeader := BackColor;
	BackColorAlternate := Color.FromArgb(240,240,240);
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	(Columns.Add('Def') as EXG2ANTTLib.Column).DisplayFilterButton := True;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(InsertItem(h,Nil,'Child 1'),Nil,'Sub-Child 1');
		InsertItem(InsertItem(h,Nil,'Child 2'),Nil,'Sub-Child 2');
	end;
	PutItems(GetItems(TObject(-1)),Nil);
	PutItems(GetItems(TObject(-1)),Nil);
	PutItems(GetItems(TObject(-1)),Nil);
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '1 apos ``';
		Visible := False;
	end;
	EndUpdate();
end
1819:
How do I sort the index column as numeric (Method 2)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			CellData[TObject(e.item),TObject(1)] := TObject(CellCaption[TObject(e.item),TObject(1)]);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	ColumnAutoResize := True;
	ShowFocusRect := False;
	with (Columns.Add('Next') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(4);
		Def[EXG2ANTTLib.DefColumnEnum.exHeaderPaddingLeft] := TObject(4);
	end;
	with (Columns.Add('Index') as EXG2ANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)';
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		SortType := EXG2ANTTLib.SortTypeEnum.SortUserData;
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
		AddItem('Item 5');
		AddItem('Item 6');
		AddItem('Item 7');
		AddItem('Item 8');
		AddItem('Item 9');
		AddItem('Item 10');
	end;
	EndUpdate();
end
1818:
How do I sort the index column as numeric (Method 1)

with AxG2antt1 do
begin
	BeginUpdate();
	with (Columns.Add('Sort Index As String (Default)') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '1 index ``';
	end;
	with (Columns.Add('Sort Index As Numeric') as EXG2ANTTLib.Column) do
	begin
		ComputedField := '%C0';
		SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
	end;
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
1817:
How can I put icons/images into buttons

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with (Columns.Add('C+B') as EXG2ANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `';
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasButton] := TObject(True);
		Def[EXG2ANTTLib.DefColumnEnum.exCellButtonAutoWidth] := TObject(True);
	end;
	Columns.Add('');
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
	DefaultItemHeight := 20;
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
1816:
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

// ButtonClick event - Occurs when user clicks on the cell's button.
procedure TWinForm1.AxG2antt1_ButtonClick(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ButtonClickEvent);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( 'ButtonClick' );
		OutputDebugString( e.item );
		OutputDebugString( e.key );
	end
end;

// CellStateChanged event - Fired after cell's state has been changed.
procedure TWinForm1.AxG2antt1_CellStateChanged(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_CellStateChangedEvent);
begin
	with AxG2antt1 do
	begin
			OutputDebugString( 'CellStateChanged' );
		OutputDebugString( e.item );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	with (Columns.Add('') as EXG2ANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 32;
		FormatColumn := '1 index ``';
	end;
	with (Columns.Add('Def') as EXG2ANTTLib.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '`     `';
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasButton] := TObject(True);
		Def[EXG2ANTTLib.DefColumnEnum.exCellButtonAutoWidth] := TObject(True);
	end;
	Columns.Add('');
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
1815:
Does filtering work with umlauts / accents characters

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (Columns.Add('Names') as EXG2ANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXG2ANTTLib.FilterTypeEnum.exPattern;
	end;
	with Items do
	begin
		AddItem('Mantel');
		AddItem('Mechanik');
		AddItem('Motor');
		AddItem('Murks');
		AddItem('Märchen');
		AddItem('Möhren');
		AddItem('Mühle');
		AddItem('Sérigraphie');
	end;
	Columns.Item[TObject(0)].Filter := '*ä*';
	ApplyFilter();
	EndUpdate();
end
1814:
How can I temporarily disable resizing the overview part of the control

with AxG2antt1 do
begin
	BeginUpdate();
	BackColorLevelHeader := BackColor;
	OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exDisableOverview;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewSplitter) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewAllowVerticalScroll) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible);
		OverviewHeight := 32;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Nil,Nil);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Nil,Nil);
	end;
	EndUpdate();
end
1813:
Is it possible to resize the overview part of the control at runtime

with AxG2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZCh' + 
	'GJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyjJ' + 
	'wgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNwg' + 
	'GOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEIF' + 
	'oEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgTE' + 
	'ycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ5' + 
	'pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjGc' + 
	'Q40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWAx' + 
	'nEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hyQ' + 
	'wuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfAS' + 
	'McaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ixx' + 
	'B4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPwf' + 
	'xEh1guAIAwQAgCAg');
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewSplitter) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewAllowVerticalScroll) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible);
		OverviewHeight := 32;
		OverviewSelBackColor := $1000000;
		OverviewBackColor := $fafafa;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Nil,Nil);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Nil,Nil);
	end;
	EndUpdate();
end
1812:
You've provided examples of how to create bars for each record of a MS Access table, however I would like to create a database connected Gantt that has multiple bars per item/resource. Could you please advise

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],'0',Nil);
			DefineSummaryBars(e.item,'0',-3,'0');
			AddBar(e.item,'SummaryB',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],'1',Nil);
			DefineSummaryBars(e.item,'1',-3,'1');
			ItemBackColor[e.item] := $f0f0f0;
		end;
		Chart.ItemBackColor[e.item] := $f0f0f0;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],ItemBar[e.item,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount],Nil);
			AddBar(e.item,'TaskB',CellValue[TObject(e.item),TObject(3)],CellValue[TObject(e.item),TObject(4)],ItemBar[e.item,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount],Nil);
		end;
	end
end;

// MouseDown event - Occurs when the user presses a mouse button.
procedure TWinForm1.AxG2antt1_MouseDownEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseDownEvent);
begin
	with AxG2antt1 do
	begin
		i := get_ItemFromPoint(-1,-1,c,hit);
		FullRowSelect := Columns.Item[TObject(c)].Data;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	HeaderHeight := 22;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	BackColorLock := Color.FromArgb(240,240,240);
	BackColorHeader := BackColorLock;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
	ColumnAutoResize := False;
	SortBarVisible := False;
	AllowGroupBy := True;
	ReadOnly := EXG2ANTTLib.ReadOnlyEnum.exReadOnly;
	ShowFocusRect := False;
	CountLockedColumns := 1;
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragScroll;
	SingleSort := False;
	ColumnsAllowSizing := True;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid;
	GridLineColor := Color.FromArgb(220,220,220);
	with Chart do
	begin
		FirstVisibleDate := '9/1/1994';
		LevelCount := 2;
		PaneWidth[False] := 256;
		with Bars.Item['Task'] do
		begin
			Height := 15;
			Color := $808080;
			StartColor := $cccc;
			EndColor := StartColor;
			OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
			OverlaidGroup := 'Task,TaskB';
			Pattern := Integer(EXG2ANTTLib.PatternEnum.exPatternGradientVBox) Or Integer(EXG2ANTTLib.PatternEnum.exPatternBox);
		end;
		with Bars.Copy('Task','TaskB') do
		begin
			Color := $808080;
			StartColor := $9999;
			EndColor := StartColor;
		end;
		with Bars.Item['Summary'] do
		begin
			OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
			OverlaidGroup := 'Summary,SummaryB';
			Color := $cccc;
			StartColor := Color;
			EndColor := Color;
		end;
		with Bars.Copy('Summary','SummaryB') do
		begin
			Color := $9999;
			StartColor := Color;
			EndColor := Color;
		end;
	end;
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Debug := True;
	Columns.Item[TObject(0)].Data := TObject(-1);
	Layout := 'singlesort="C5:1";multiplesort=" C1:2"';
	EndUpdate();
end
1811:
How can I filter for multiple captions on a single column, using OR clause

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := True;
	SearchColumnIndex := 1;
	FilterBarPromptVisible := True;
	with Columns do
	begin
		(Add('Name') as EXG2ANTTLib.Column).Width := 96;
		with (Add('Title') as EXG2ANTTLib.Column) do
		begin
			Width := 96;
		end;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellValue[TObject(h0),TObject(1)] := 'Vice President, Sales';
		CellValue[TObject(h0),TObject(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellValue[TObject(h0),TObject(1)] := 'Sales Manager';
		CellValue[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Robert King');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellValue[TObject(h0),TObject(1)] := 'Inside Sales Coordinator';
		CellValue[TObject(h0),TObject(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'London';
	end;
	FilterBarPromptColumns := '1';
	FilterBarPromptPattern := 'Vice Inside';
	FilterBarPromptType := EXG2ANTTLib.FilterPromptEnum.exFilterPromptContainsAny;
	EndUpdate();
end
1810:
How can I filter for multiple captions on a single column, using AND clause

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := True;
	SearchColumnIndex := 1;
	FilterBarPromptVisible := True;
	with Columns do
	begin
		(Add('Name') as EXG2ANTTLib.Column).Width := 96;
		with (Add('Title') as EXG2ANTTLib.Column) do
		begin
			Width := 96;
		end;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellValue[TObject(h0),TObject(1)] := 'Vice President, Sales';
		CellValue[TObject(h0),TObject(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellValue[TObject(h0),TObject(1)] := 'Sales Manager';
		CellValue[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Robert King');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellValue[TObject(h0),TObject(1)] := 'Inside Sales Coordinator';
		CellValue[TObject(h0),TObject(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'London';
	end;
	FilterBarPromptColumns := '1';
	FilterBarPromptPattern := 'Vice Sales';
	FilterBarPromptType := EXG2ANTTLib.FilterPromptEnum.exFilterPromptContainsAll;
	EndUpdate();
end
1809:
How can I display the limits/margins of the project, in the overview part of the control

with AxG2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZCh' + 
	'GJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyjJ' + 
	'wgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNwg' + 
	'GOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEIF' + 
	'oEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgTE' + 
	'ycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ5' + 
	'pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjGc' + 
	'Q40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWAx' + 
	'nEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hyQ' + 
	'wuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfAS' + 
	'McaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ixx' + 
	'B4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPwf' + 
	'xEh1guAIAwQAgCAg');
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := EXG2ANTTLib.OverviewVisibleEnum($400 Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowSelMargins) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowMargins) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible));
		OverviewHeight := 64;
		OverviewSelBackColor := $1000000;
		OverviewBackColor := $fafafa;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Nil,Nil);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Nil,Nil);
	end;
	EndUpdate();
end
1808:
Is it possible to display a time-scale for the overview part of the control (separated)

with AxG2antt1 do
begin
	BeginUpdate();
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScaleSplit) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible);
		OverviewHeight := 48;
		LevelCount := 2;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Nil,Nil);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Nil,Nil);
	end;
	EndUpdate();
end
1807:
Is it possible to display a time-scale for the overview part of the control

with AxG2antt1 do
begin
	BeginUpdate();
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible);
		LevelCount := 2;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Nil,Nil);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Nil,Nil);
	end;
	EndUpdate();
end
1806:
How can I display the time-scale only, in the overview part of the control

with AxG2antt1 do
begin
	BeginUpdate();
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		OverviewVisible := Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewHideBars) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible);
		LevelCount := 2;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/11/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','2/2/2001','2/11/2001',Nil,Nil);
		AddBar(AddItem('Item 3'),'Task','3/2/2001','3/11/2001',Nil,Nil);
	end;
	EndUpdate();
end
1805:
How can I detect that the mouse pointer is within an InsideZoom object
// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
	with AxG2antt1 do
	begin
		with Chart do
		begin
			d := DateFromPoint[-1,-1];
			iz := (InsideZooms.Contains[TObject(d)] as Object);
			OutputDebugString( d );
			OutputDebugString( 'If the iz object is nothing, the date is not zoomed, else it is.' );
			OutputDebugString( iz );
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
		AllowInsideZoom := True;
		InsideZooms.Add('1/10/2001');
	end;
	EndUpdate();
end
1804:
Is it possible to word-wrap text/caption on the bar, so it gets displayed on multiple lines

with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	ItemsAllowSizing := EXG2ANTTLib.ItemsAllowSizingEnum.exResizeItem;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
	HeaderHeight := 28;
	DefaultItemHeight := 24;
	BackColorLevelHeader := BackColor;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Bump;
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
		with Bars.Copy('Task','TaskB') do
		begin
			Height := 15;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
			StartColor := $ffe8cc;
			EndColor := StartColor;
			Color := $ff0000;
		end;
		with Bars.Item['Task'] do
		begin
			Height := -1;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
			StartColor := $ffe8cc;
			EndColor := StartColor;
			Color := $ff0000;
		end;
	end;
	with Items do
	begin
		h := AddItem('Word-Wrap Inside');
		AddBar(h,'Task','1/9/2001','1/13/2001','A1',Nil);
		ItemBar[h,'A1',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(2,2,100%-4,100%-4),text=`This is a bit of text that should break the line`,wordwrap]';
		h := AddItem('Word-Wrap Inside');
		AddBar(h,'Task','1/5/2001','1/19/2001','A2',Nil);
		ItemBar[h,'A2',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(2,2,100%-4,100%-4),align=0x11,text=`This is a bit of text that should break the line`,wordwrap]';
		h := AddItem('Word-Wrap Back');
		AddBar(h,'TaskB','1/9/2001','1/13/2001','A3',Nil);
		ItemBar[h,'A3',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'client[align=0x11,text=`This is a bit of text that should break the line`,wordwrap]';
		ItemBar[h,'A3',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtFlags] := TObject(2);
	end;
	EndUpdate();
end
1803:
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := False;
	SearchColumnIndex := 1;
	FilterBarHeight := 0;
	FilterBarPromptVisible := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		(Add('Name') as EXG2ANTTLib.Column).Width := 96;
		(Add('Title') as EXG2ANTTLib.Column).Width := 96;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellValue[TObject(h0),TObject(1)] := 'Vice President, Sales';
		CellValue[TObject(h0),TObject(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellValue[TObject(h0),TObject(1)] := 'Sales Manager';
		CellValue[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Robert King');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellValue[TObject(h0),TObject(1)] := 'Inside Sales Coordinator';
		CellValue[TObject(h0),TObject(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellValue[TObject(h0),TObject(1)] := 'Sales Representative';
		CellValue[TObject(h0),TObject(2)] := 'London';
	end;
	FilterBarPromptPattern := 'London';
	EndUpdate();
end
1802:
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			SetParent(e.item,FindItem[CellValue[TObject(e.item),'ReportsTo'],'EmployeeID',Nil]);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('SELECT * FROM Employees ORDER BY ReportsTo','Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\VB\SAMPLE.MDB',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.ExpandItem[0] := True;
	EndUpdate();
end
1801:
How can I highlight the limits/margins of a summary bar, according with the child bars

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABRkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjhwkAIIQK/cZRPC0Ow8GSEZAgOKIch6FgCQjEIxDKIsVRZEiDYRmGLpIiOJoWSQBUIyJKoAQ' + 
	'0f6fIziaTpNiGL4yTBPMzyJRcEx1GyBZ5negaAo2AwIQiUBomGahajkMqZQAJaCSCI2Y4eDZCIoTXR1WAxDq3ZruKpLUpOc4DOrEMIwCEBA=');
		Add(2,'CP:1 -4 0 5 0');
		Add(3,'gBFLBCJwBAEHhEJAAEhABOMGACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQRHc5TNC' + 
	'MTRRECDY4kAYpAiKRYbSpAcyQHQ8bQtHwYKAoOg6JjWIAHRqCMI0XINHQ3FwaRJsCwoJhOZIDWZENDQTSsLSxJSkIRfe4wArNf4XVBVMqSdKEZRJLybJwADApAo2eIlQ' + 
	'jJdQ4TSdBSdQwDLYhECpbwCT6JT7jGLQJZsNyvBLIYDrKA8UozFqHQRYNhxDZNShhM6rMigPQQAq8AKlRbVNzXLamLwHRS9BpoORhUjHD4bVxVOyaPpAAaBFbhI44QZO' + 
	'HYNYfjgaI0BySp8HMVZdlgaxtBqexWkqOw1lGbZzlwfQ0AwYR/gka5FiMGpgkQYYviGV4kBUWpmlsaYGHMEgACECQUAaEYMHQHRHCGFRBECRJkGQQgTGCVBoDYQhCgQJ' + 
	'ZoG4EIAGEFwGB+dwxHaB5iAabReggYhGnUToJGIRgCCiCBdjiNguGmYo4gIKoMGIKIeDSCYTGiXg4EITo3hAiJAICA==');
	end;
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Summary'].Color := $3000000;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Nil);
		hTask := InsertItem(hSummary,Nil,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTask := InsertItem(hSummary,Nil,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Nil);
		hTask := InsertItem(hSummary,Nil,'Task C');
		AddBar(hTask,'Task','1/6/2001','1/10/2001','K3',Nil);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
		ItemBar[hSummary,'',EXG2ANTTLib.ItemBarPropertyEnum.exSummaryBarBackColor] := TObject(33554432);
	end;
	EndUpdate();
end