1968:
How do I get the duration/working count of the bar (sample 6,excrd)

with G2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 48;
	ShowFocusRect := False;
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	BackColorLevelHeader := BackColor;
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib_TLB.exHLines;
		PaneWidth[False] := 64;
		LevelCount := 2;
		FirstVisibleDate := '12/26/2001';
		with Bars.Add('Task:Split') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib_TLB.exBarToolTip] := '<%=%263%>';
			Def[EXG2ANTTLib_TLB.exBarOffset] := OleVariant(-12);
		end;
		ColumnsFormatLevel := '1,2/3';
	end;
	Columns.Add('Tasks');
	with (IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.LeftAlignment;
		FormatColumn := 'value + `d`';
	end;
	with (IUnknown(Columns.Add('Working')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(258);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.RightAlignment;
		FormatColumn := 'value + `w`';
	end;
	with (IUnknown(Columns.Add('Working-Period')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(263);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.CenterAlignment;
		FormatColumn := '((value replace `\r\n` with `,`) replace `#` with ``) replace ` ` with ``';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/11/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
		AddBar(AddItem('Task 3'),'Task','12/31/2001','1/13/2002',Null,Null);
	end;
	EndUpdate();
end
1967:
How do I get the duration/working count of the bar (sample 5)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.G2antt1AddItem(ASender: TObject; Item : HITEM);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			ItemMaxHeight[Item] := 64;
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	BackColorAlternate := RGB(240,240,240);
	with Chart do
	begin
		PaneWidth[False] := 256;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2002';
		with Bars.Add('Task:Split') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib_TLB.exBarToolTip] := '<%=%263%>';
		end;
		ColumnsFormatLevel := '1,2';
		SelBackColor := G2antt1.SelBackColor;
	end;
	with (IUnknown(Columns.Add('Task')) as EXG2ANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
	end;
	with (IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.LeftAlignment;
	end;
	with (IUnknown(Columns.Add('Working')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(258);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.RightAlignment;
	end;
	with (IUnknown(Columns.Add('Working-Period')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(263);
		Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/12/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/4/2002','1/16/2002',Null,Null);
	end;
	EndUpdate();
end
1966:
How do I get the duration/working count of the bar (sample 4)

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 64;
		LevelCount := 2;
		FirstVisibleDate := '12/26/2001';
		Bars.Add('Task:Split').Shortcut := 'Task';
		ColumnsFormatLevel := '1,2';
	end;
	(IUnknown(Columns.Add('Task')) as EXG2ANTTLib_TLB.Column).Width := 48;
	with (IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.LeftAlignment;
		FormatColumn := 'value + `d`';
	end;
	with (IUnknown(Columns.Add('Working')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(258);
		Visible := False;
		Alignment := EXG2ANTTLib_TLB.RightAlignment;
		FormatColumn := 'value + `w`';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/12/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
	end;
	EndUpdate();
end
1965:
How do I get the duration/working count of the bar (sample 3)

// BarResizing event - Occurs when a bar is moving or resizing.
procedure TForm1.G2antt1BarResizing(ASender: TObject; Item : HITEM;Key : OleVariant);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			OutputDebugString( CellCaption[OleVariant(Item),OleVariant(0)] );
			OutputDebugString( 'Working' );
			OutputDebugString( ItemBar[Item,OleVariant(Key),EXG2ANTTLib_TLB.exBarWorkingCount] );
			OutputDebugString( CellCaption[OleVariant(Item),OleVariant(0)] );
			OutputDebugString( 'Duration' );
			OutputDebugString( ItemBar[Item,OleVariant(Key),EXG2ANTTLib_TLB.exBarDuration] );
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 64;
		LevelCount := 2;
		FirstVisibleDate := '12/26/2001';
		Bars.Add('Task:Split').Shortcut := 'Task';
	end;
	(IUnknown(Columns.Add('Task')) as EXG2ANTTLib_TLB.Column).Width := 48;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/12/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
	end;
	EndUpdate();
end
1964:
How do I get the duration/working count of the bar (sample 2)

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 64;
		LevelCount := 2;
		FirstVisibleDate := '12/26/2001';
		with Bars.Add('Task:Split') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<%=%258%>w';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Def[EXG2ANTTLib_TLB.exBarExtraCaption] := '<%=%513%>d';
			Def[EXG2ANTTLib_TLB.exBarExtraCaptionHAlign] := OleVariant(16);
		end;
	end;
	(IUnknown(Columns.Add('Task')) as EXG2ANTTLib_TLB.Column).Width := 48;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/12/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
	end;
	EndUpdate();
end
1963:
How do I get the duration/working count of the bar (sample 1)

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 196;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2002';
		Bars.Add('Task:Split').Shortcut := 'Task';
	end;
	(IUnknown(Columns.Add('Task')) as EXG2ANTTLib_TLB.Column).Width := 48;
	(IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
	(IUnknown(Columns.Add('Working')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(258);
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/12/2002',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/3/2002','1/15/2002',Null,Null);
	end;
	EndUpdate();
end
1962:
How can I draw a solid frame around the the focusing item

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	DefaultItemHeight := 20;
	with VisualAppearance do
	begin
		RenderType := -1;
		Add(1,'gBFLBCJwBAEHhEJAAEhABOkGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeDYMiSNoYDJCM4wHI' + 
	'URRJFCUJSGWQpTgSIgyT5HFIxXKoASbJabZLhWS6EpWOotTbIQQRYCkEyfKKfZyGURZQqOKA1DBZErWTJESRFJqLazgO4LAhyQYrVgAErzVKVCRNOqbJzADApdpGQJTU' + 
	'LDNTQHRFIyhOSnIRrWbMAhid6JUZiVT4dBOIYhSYANAqCwLFqrDJmWrpV5WZjlZ47V6BdAyXJsIrmFJEXaOGhyDDlGybSDZYryfZhUziUw4XjbWwZDqPF6DKTTdSGLRE' + 
	'E8WZVlURZvDaep3C+AY8kAYRgGCCBJECUhjDoHROEYWgoAGTQ1CEEx9lGMY0CQUYSnuZQDBGBYFlOH5+H+igGAKAJgEgFgGgGVgDn4CoCmCSA2A6A5hAgDgQgSYRIE4E' + 
	'oFGGCBiBeBhhkgPgbgcYgICoH4IGGWIOCSBhiGiHgVgoYooFoAoLGIWI+DCCgjCiTgrgII4ImYOoOmOSJ2AYOpWlQDQBICA=');
	end;
	ShowFocusRect := True;
	Background[EXG2ANTTLib_TLB.exShowFocusRect] := $1000000;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	Chart.PaneWidth[True] := 1;
	with (IUnknown(Columns.Add('P1')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1961:
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 2)

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	DefaultItemHeight := 20;
	ShowFocusRect := True;
	with VisualAppearance do
	begin
		RenderType := -1;
		Add(2,'gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeCRUgyJI3RgMUIzVA' + 
	'cRRFEiUJQlIZZCjOAw0SIMU7xZRcNxsACnaZnCR4NiuRYiUhOcqzRIQIQ4CiEahqOgJbDUJYwWZKAyjBY8XTZFCSJCpeJ6egOc5jRxQUp1WAEXx3GSsJKvCZ5cADBY+V' + 
	'LQNS0JBtMSTKSLaiuWoIJqCPaDRheWKQJh1NSnLqEcjyYANDxDCZlWzAYxWTZ2Uz7N7PbB0HY4DyPGKZYrfESVRbQcZNS6nNigPI9XhfGq6VjRe63ZaOaYpWrnOJqTRW' + 
	'jOKYujWdZ2BGO5lkuBAAkmcQkDmDBEAwEQJCgGhMGcQ4pkiSxGAAOYmkQIhvkYNg2gSCgyj+LI4GIMIwF2XQoAYAoAmASAWAaAZgggJgKFiT54DYDoDmECBGBKBJgGgT' + 
	'gWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChiigYgsgsYYYBYMIKCMKJOCuDRjGiOgLg6Y5InYPoPmQCAkmsXAQDQBCAg=');
		Add(3,'CP:2 -3 0 3 0');
	end;
	Background[EXG2ANTTLib_TLB.exShowFocusRect] := $3010101;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	Chart.PaneWidth[True] := 1;
	with (IUnknown(Columns.Add('P1')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1960:
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 1)

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	ShowFocusRect := True;
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABHoDg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFiCCQwSDKEjyCKcGRHF6MI6gOYpCgOIYjRJNIASVA' + 
	'ceAAGaUZrjSgobjmOYhAJCLqhYIgASXJqLaBlOCaAieSc+QhjQJIJoeCZXU5TFg1BTsOhqEqcRiseaRVDCaIJWzbdYWLDdNQHHKYLjnWorbpSJZ5XjNEySDQkMS9PrEJ' + 
	'7vST8FBCdAABLJUB2BR9RwxRafKpnWwJDpmCaOQLXEB5DK1PyVMTKYrtGy7GrIAJxWxbV4UHh+QABOzIMAvHKJMwvHYcUZne5XVLeF41HbONogPaJZyIAK2cLROq6Xo7' + 
	'GEcJZEcLASB4DwvgWUZlE6AQQhKAYkkYdA6hyDIwHgSoqFwQgmnsYxjGgSIiBOTpSEiAwRgOJI7j4JAHA6U5wm0MpPlOBIjD8TZiGYCICiCGAuA6AxhAgMgSgOYQ4DYB' + 
	'g/g6cw1n+ABOmMMJ9DmCwjnScw4RsVJngkYh4hoKIKmKKI2CmC5ikiQgqgiT5jhyMw8g4QwIn0OIKEiCJhD8DwTGyfA7k0WQOEWEQkGkJhIhKZB5DYSoTiSCQEn4PQOC' + 
	'OXJcCeIJjliaIQk0aRyF4O5llmAhfhgZhJg4ZoYiaAxYn4PZOhOZJaCUZYTiYQw1mcOZUm+HQnHmWh4h6Z4pnYeYfk0eYsmqG4nAgNJ2DqD5DkCWoiGiOgqgyI5omoRo' + 
	'NiSaQKFKEojCaM4ugSFhOjkAJcieKgDkaH4oioGoOiaKRqgqEoqDddwyhuAxPgOMJ8DyDZqk6NYtCsapmjiLprHqdo6i+K5K1oPhOlqPgKD4DpjnII4yiOewuk6MxtAs' + 
	'MpSjObQ7EaT4wk6ewYn0PgPAiCJkjeLgDk6X44i4G4OmaORuguEpqDkLAzkaWg+E8GIUmaPIvEOVpzj2Lxbl6eo+G+S5in4OYPmOaJyjuTwjnYWpBg6DAjAqQZwkwJwN' + 
	'kKcJsEcEJCDBEpaD6Dw8BiapGjGSgfB2RpxmyBwgkicZ8haBw/g+M5TBcPQPlOXJskscp8jsMJMnMLJXDGTZzEyYw2kwMoDlcFw9i2M4/EGUJPg0CxFlENBtCcSJSnQf' + 
	'Q0m+SgPHsaJ7lALZLG6XZVHWDRfFqVY1k0ZxdladYTnifJUGaeAWAeMnSGcGWgBObJ3lWbwdjKW5cHcTZPHaLkN4GxXDlFqFsA4uRbBOGAFAEIzAsDEFOBkfYqR4D6AO' + 
	'BEYo8QuBvAmMceInBDgcD0JwOIqQyJ1DMAwG4IANDnHSMoK4QhOgMBGNEIQvQWAdGenETIswGiddsAAQAgCAgA==');
		Add(2,'gBFLBCJwBAEHhEJAAEhABeEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADDFIBQSLAYROGSDJBGODJDjWGIeQLOEhQHI' + 
	'MRxPE6UYLhWYpBDKPYcUbGc7yBBMVwGf59XzACoKSheQIVSDQkw6Fo6NYhAxHALyNRkBy8f60KjtGpodDUJYvW5JYyjBZ8EznOqbJBkeJ7BgOe5NQjaD72VgdWQJFSWJ' + 
	'ajWYYJDOJY2ZAAE5TVINEwxJbDaylChIdxaF6WAzZEBhBYoATPNLBMrhWqKDw2XaQWBCOgwHYeR5LU7BdRwbIrRq2eAAXbcVyXfDddZlBK+QA0SK9lRVTKvJZmKgBWw1' + 
	'COSxmAAGw4kcNx1iKFBiCAfQsG8lJemucg7nsXpUHOOxrm+DI3jOH4XAOBx2nscw0j2HhPG4L5uGEVIECQCBCEUAYkGMHQHFGSBlGaAxkEgQgTGCVBsDYQhCgQJZrHKU' + 
	'ggGEShkFGNgIlsNpPnMHJHD+TADAIJIJiIWIeCqChikiIgmgiD5zHyXxgiACJKCuC4jHiZgtg6I4IlkCQwkwOIonMPJjEkFhGhGZBpA4KoMBCGJuEiE5lAkGg7hMY4JE' + 
	'YVoUCUNAOE6FZl0KWQACWOR2GKF5mBmChchkJRZhoXYaCKKYqGuDglEmNhuhWZpIiYc4dCcCRqGmHZlgm2YxAwSQKESHwkFkKgpiAIAIH4PIimOOg2DiChoiQJRRD+TZ' + 
	'DHCfwyAyCgyg+JpiioYJ/DgDgIlECQ6lwRAEICA=');
		Add(3,'CP:2 -2 0 2 0');
	end;
	SelBackColor := $1000000;
	SelForeColor := RGB(0,0,0);
	Chart.PaneWidth[True] := 1;
	Background[EXG2ANTTLib_TLB.exShowFocusRect] := $3ff0000;
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('P1')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1959:
How can I display the start/end margins of bars, when cursor hovers it like a tooltip

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('exBarToolTip');
	with Chart do
	begin
		PaneWidth[False] := 96;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Task'].Def[EXG2ANTTLib_TLB.exBarToolTip] := '<b><%=%9 + ''/'' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>';
	end;
	with Items do
	begin
		AddBar(AddItem('Bar.Def'),'Task','1/2/2001','1/9/2001','K1',Null);
		AddBar(AddItem('Bar.Def'),'Task','1/3/2001','1/10/2001','K1',Null);
		h := AddItem('Items.ItemBar');
		AddBar(h,'Unknown','1/4/2001','1/11/2001','K',Null);
		ItemBar[h,'K',EXG2ANTTLib_TLB.exBarToolTip] := 'Start:<%=%1%><br>End:<%=%2%>';
	end;
	EndUpdate();
end
1958:
Is it possible to define different kinds of summary bars with using the EBN files

with G2antt1 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_TLB.exBarHAlignCaption] := OleVariant(18);
			Color := $1;
		end;
		with Bars.Item['Summary'] do
		begin
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
			Color := $2000000;
		end;
	end;
	with Items do
	begin
		hSummaryJ := AddItem('Summary A');
		AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J',Null);
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.1');
		AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1',Null);
		hTaskJ := InsertItem(hSummaryJ,Null,'Task A.2');
		AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2',Null);
		DefineSummaryBars(hSummaryJ,'J',-1,'<*>');
		hSummaryK := AddItem('Summary B');
		AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.1');
		AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Null);
		hTaskK := InsertItem(hSummaryK,Null,'Task B.2');
		AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Null);
		DefineSummaryBars(hSummaryK,'K',-1,'<*>');
		ItemBar[0,'<K*>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		hSummaryZ := AddItem('Summary B');
		AddBar(hSummaryZ,'Summary','1/2/2001','1/2/2001','Z',Null);
		hTaskZ := InsertItem(hSummaryZ,Null,'Task B.1');
		AddBar(hTaskZ,'Task','1/2/2001','1/5/2001','Z1',Null);
		hTaskZ := InsertItem(hSummaryZ,Null,'Task B.2');
		AddBar(hTaskZ,'Task','1/4/2001','1/8/2001','Z2',Null);
		DefineSummaryBars(hSummaryZ,'Z',-1,'<*>');
		ItemBar[hSummaryZ,'Z',EXG2ANTTLib_TLB.exBarColor] := OleVariant(16842496);
		ItemBar[0,'<Z1>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(50266112);
		ItemBar[0,'<Z2>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(33554176);
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
1957:
How can I display the week-number in ISO8601 format

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '12/12/2007';
		DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
		UnitScale := EXG2ANTTLib_TLB.exWeek;
		Level[0].FormatLabel := 'value + `<r><off -4><fgcolor=808080><font ;6>` + year(dvalue)';
		Level[1].FormatLabel := '(value = 1 ? `<bgcolor=000000><fgcolor=FFFFFF>` : ``) + value';
		WeekNumberAs := EXG2ANTTLib_TLB.exISO8601WeekNumber;
		FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
	end;
	EndUpdate();
end
1956:
I have a column right-aligned. How can I display its check box aligned to the right, as it appears to the left of the cell's caption

with G2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	Chart.PaneWidth[True] := 0;
	DrawGridLines := EXG2ANTTLib_TLB.exVLines;
	with Columns do
	begin
		with (IUnknown(Add('Left')) as EXG2ANTTLib_TLB.Column) do
		begin
			AllowSizing := False;
			Width := 96;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			FormatColumn := '0 pos `A-Z`';
		end;
		with (IUnknown(Add('Center')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderAlignment := EXG2ANTTLib_TLB.CenterAlignment;
			Alignment := HeaderAlignment;
			AllowSizing := False;
			Width := 96;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			FormatColumn := '0 pos `A-Z`';
		end;
		with (IUnknown(Add('Right')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderAlignment := EXG2ANTTLib_TLB.RightAlignment;
			Alignment := HeaderAlignment;
			AllowSizing := False;
			Width := 96;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			FormatColumn := '0 pos `A-Z`';
			Def[EXG2ANTTLib_TLB.exCellDrawPartsOrder] := 'caption,check,icon,icons,picture';
		end;
		Add('');
	end;
	with Items do
	begin
		CellState[OleVariant(AddItem('Item 1')),OleVariant(3)] := 1;
		CellState[OleVariant(AddItem('Item 2')),OleVariant(2)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
1955:
Can I display the column's multiple-lines caption vertically oriented (method 2)

with G2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 48;
	ColumnAutoResize := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('And others ...');
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := 'First Column';
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 0;
		end;
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := '<c><b>Second Column';
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 1;
		end;
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := '<r>Third Column';
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 2;
		end;
	end;
	with Items do
	begin
		CellState[OleVariant(AddItem('Item 1')),OleVariant(3)] := 1;
		CellState[OleVariant(AddItem('Item 2')),OleVariant(2)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
1954:
Can I display the column's multiple-lines caption vertically oriented (method 1)

with G2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 48;
	HeaderSingleLine := False;
	ColumnAutoResize := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('And others ...');
		with (IUnknown(Add('First Column')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 0;
		end;
		with (IUnknown(Add('Second Column')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderBold := True;
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 1;
		end;
		with (IUnknown(Add('Third Column')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderVertical := True;
			Width := 36;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellPaddingLeft] := OleVariant(8);
			Position := 2;
		end;
	end;
	with Items do
	begin
		CellState[OleVariant(AddItem('Item 1')),OleVariant(3)] := 1;
		CellState[OleVariant(AddItem('Item 2')),OleVariant(2)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
1953:
Can I display the column's caption vertically oriented (method 2)

with G2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 48;
	ColumnAutoResize := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('And others ...');
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := 'First';
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 0;
		end;
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := '<c><b>Second';
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 1;
		end;
		with (IUnknown(Add('')) as EXG2ANTTLib_TLB.Column) do
		begin
			HTMLCaption := '<r>Third';
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 2;
		end;
	end;
	with Items do
	begin
		CellState[OleVariant(AddItem('Item 1')),OleVariant(3)] := 1;
		CellState[OleVariant(AddItem('Item 2')),OleVariant(2)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
1952:
Can I display the column's caption vertically oriented (method 1)

with G2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 48;
	ColumnAutoResize := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('And others ...');
		with (IUnknown(Add('First')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 0;
		end;
		with (IUnknown(Add('Second')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderBold := True;
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 1;
		end;
		with (IUnknown(Add('Third')) as EXG2ANTTLib_TLB.Column) do
		begin
			HeaderVertical := True;
			Width := 20;
			AllowSizing := False;
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Position := 2;
		end;
	end;
	with Items do
	begin
		CellState[OleVariant(AddItem('Item 1')),OleVariant(3)] := 1;
		CellState[OleVariant(AddItem('Item 2')),OleVariant(2)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(1)] := 1;
	end;
	EndUpdate();
end
1951:
How can I resize all task-bars 0-length

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/3/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/5/2017',Null,Null);
		ItemBarEx['itembar(513) = 0 and itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		ItemBarEx['itembar(513) = 0 and itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarDuration] := 'value + 1';
	end;
	EndUpdate();
end
1950:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 3)
with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (IUnknown(Columns.Add('Duration')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(513);
		Visible := False;
	end;
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with ConditionalFormats.Add('%1 = 0',Null) do
	begin
		Bold := True;
		BackColor := $bebebe;
		ChartBackColor := BackColor;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/3/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/5/2017',Null,Null);
	end;
	EndUpdate();
end
1949:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 2)

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/3/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/5/2017',Null,Null);
		ItemBarEx['itembar(513) = 0',EXG2ANTTLib_TLB.exBarCaption] := '`zero-length`';
	end;
	EndUpdate();
end
1948:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 1)

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/3/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/5/2017',Null,Null);
		ItemBarEx['itembar(513) = 0',EXG2ANTTLib_TLB.exBarBackgroundExt] := '`[frame=RGB(255,0,0),framethick,pattern=6,patterncolor=RGB(255,0,0)]`';
		ItemBarEx['itembar(513) = 0',EXG2ANTTLib_TLB.exBarBackgroundExtInflate] := '`-4,-4,4,4`';
	end;
	EndUpdate();
end
1947:
How can I find how many tasks/bars of 0-length (zero,empty) do I have

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/3/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/5/2017',Null,Null);
		OutputDebugString( ItemBarEx['itembar(513) = 0',EXG2ANTTLib_TLB.exBarsCount] );
	end;
	EndUpdate();
end
1946:
How can I remove all bars from selected items

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := $f0f0f0;
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsStack;
			OverlaidGroup := 'Task,Task-Diff';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		end;
		with Bars.Copy('Task','Task-Diff') do
		begin
			Height := 4;
			Color := $ff;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','8/3/2017','8/9/2017',Null,Null);
		SelectItem[h] := True;
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017','',Null);
		AddBar(h,'Task-Diff','8/5/2017','8/14/2017','P',Null);
		SelectItem[h] := True;
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		OutputDebugString( 'Bars before remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
		ItemBarEx['itemisselected',EXG2ANTTLib_TLB.exBarKey] := '`toberemove` + value ';
		RemoveBar(0,'<toberemove*>');
		OutputDebugString( 'Bars after remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
	end;
	EndUpdate();
end
1945:
How can I remove task bars from selected items

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := $f0f0f0;
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsStack;
			OverlaidGroup := 'Task,Task-Diff';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		end;
		with Bars.Copy('Task','Task-Diff') do
		begin
			Height := 4;
			Color := $ff;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','8/3/2017','8/9/2017',Null,Null);
		SelectItem[h] := True;
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017','',Null);
		AddBar(h,'Task-Diff','8/5/2017','8/14/2017','P',Null);
		SelectItem[h] := True;
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		OutputDebugString( 'Bars before remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
		ItemBarEx['itemisselected and itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarKey] := '`toberemove` + value ';
		RemoveBar(0,'<toberemove*>');
		OutputDebugString( 'Bars after remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
	end;
	EndUpdate();
end
1944:
How can I change the pattern for some bars only

with G2antt1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','8/3/2017','8/9/2017',Null,Null);
		CellState[OleVariant(h),OleVariant(0)] := 1;
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017',Null,Null);
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx['cellstate(0)',EXG2ANTTLib_TLB.exBarPattern] := OleVariant(6);
	end;
	EndUpdate();
end
1943:
How do I apply the same effort to all bars

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		HistogramVisible := True;
		HistogramHeight := 64;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarEffort] := OleVariant(2);
	end;
	EndUpdate();
end
1942:
How do I apply the same percent to all bars

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Add('Task%Progress') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.5);
	end;
	EndUpdate();
end
1941:
How can I set the same duration for all bars

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarDuration] := OleVariant(4);
	end;
	EndUpdate();
end
1940:
How do I move all bars to end at the same date-time

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarMoveEnd] := '#8/15/2017#';
	end;
	EndUpdate();
end
1939:
How do I move all bars to start at the same date-time

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarMoveStart] := '#8/2/2017#';
	end;
	EndUpdate();
end
1938:
How do I apply a new color for some bars, while others should be shown with a different color

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := $f0f0f0;
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsStack;
			OverlaidGroup := 'Task,Task-Diff';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		end;
		with Bars.Copy('Task','Task-Diff') do
		begin
			Height := 4;
			Color := $ff;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017','',Null);
		AddBar(h,'Task-Diff','8/5/2017','8/14/2017','P',Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarColor] := 'cellcaption(0) like `*2` ? 0x0000FF : 0x00FF00';
	end;
	EndUpdate();
end
1937:
How do I hide some bars, and show others

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := $f0f0f0;
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsStack;
			OverlaidGroup := 'Task,Task-Diff';
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		end;
		with Bars.Copy('Task','Task-Diff') do
		begin
			Height := 4;
			Color := $ff;
			Def[EXG2ANTTLib_TLB.exBarCaption] := '<font ;6><%=%0%>';
			Def[EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','8/3/2017','8/9/2017',Null,Null);
		SelectItem[h] := True;
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017','',Null);
		AddBar(h,'Task-Diff','8/5/2017','8/14/2017','P',Null);
		SelectItem[h] := True;
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		ItemBarEx['-1',EXG2ANTTLib_TLB.exBarTransparent] := 'itembar(0) = `Task` ? 0 : 100';
	end;
	EndUpdate();
end
1936:
I like how ItemBarEx works, the question is how can I remove the bars based on the same criteria

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Null,Null);
		AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Null,Null);
		AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Null,Null);
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Null,Null);
		OutputDebugString( 'Bars before remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
		ItemBarEx['cellcaption(0) like `*2 *3`',EXG2ANTTLib_TLB.exBarKey] := '`toberemove` + value ';
		RemoveBar(0,'<toberemove*>');
		OutputDebugString( 'Bars after remove: ' );
		OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarsCount] );
	end;
	EndUpdate();
end
1935:
Is it possible to automatically color the bar being checked

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
end;

with G2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 256;
		FirstVisibleDate := '1/1/2017';
	end;
	with ConditionalFormats.Add('%CS0','check') do
	begin
		Bold := True;
		ApplyToBars := 'Task';
		BarColor := $10000;
	end;
	with (IUnknown(Columns.Add('Items')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		Width := 256;
	end;
	(IUnknown(Columns.Add(G2antt1.ConditionalFormats.Item['check'].Expression)) as EXG2ANTTLib_TLB.Column).FormatColumn := G2antt1.ConditionalFormats.Item['check'].Expression;
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2017','1/12/2017',Null,Null);
		h := AddItem('Item 2');
		AddBar(h,'Task','1/3/2017','1/13/2017',Null,Null);
		CellState[OleVariant(h),OleVariant(0)] := 1;
		h := AddItem('Item 3');
		AddBar(h,'Task','1/4/2017','1/14/2017',Null,Null);
		CellState[OleVariant(h),OleVariant(0)] := 1;
	end;
	EndUpdate();
end
1934:
How do I automatically bold items being checked

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
end;

with G2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	Chart.PaneWidth[True] := 0;
	with ConditionalFormats.Add('%CS0','check') do
	begin
		Bold := True;
	end;
	(IUnknown(Columns.Add('Items')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
	(IUnknown(Columns.Add(G2antt1.ConditionalFormats.Item['check'].Expression)) as EXG2ANTTLib_TLB.Column).FormatColumn := G2antt1.ConditionalFormats.Item['check'].Expression;
	with Items do
	begin
		AddItem('Item 1');
		CellState[OleVariant(AddItem('Item 2')),OleVariant(0)] := 1;
		AddItem('Item 3');
	end;
	EndUpdate();
end
1933:
Can I display the radio-button with a solid color

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	RadioImage[False] := 32699122;
	RadioImage[True] := 16777216;
	(IUnknown(Columns.Add('Check')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellHasRadioButton] := OleVariant(True);
	with Items do
	begin
		AddItem('Radio 1');
		CellState[OleVariant(AddItem('Radio 2')),OleVariant(0)] := 1;
		AddItem('Radio 1');
	end;
	EndUpdate();
end
1932:
Can I display the check-box with a solid color

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	CheckImage[EXG2ANTTLib_TLB.Unchecked] := 32699122;
	CheckImage[EXG2ANTTLib_TLB.Checked] := 16777216;
	(IUnknown(Columns.Add('Check')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
	with Items do
	begin
		AddItem('Check 1');
		CellState[OleVariant(AddItem('Check 2')),OleVariant(0)] := 1;
		AddItem('Check 3');
	end;
	EndUpdate();
end
1931:
How can I use the CellState with ConditionalFormat/ComputedField/FormatColumn

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exGroupLinesInsideLeaf;
	SelBackMode := EXG2ANTTLib_TLB.exTransparent;
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Items')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with (IUnknown(Columns.Add('Format')) as EXG2ANTTLib_TLB.Column) do
	begin
		FormatColumn := '%CS0';
		Caption := FormatColumn;
		Def[EXG2ANTTLib_TLB.exCellForeColor] := OleVariant(8421504);
		Def[EXG2ANTTLib_TLB.exHeaderForeColor] := Def[EXG2ANTTLib_TLB.exCellForeColor];
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Item 1');
		CellState[OleVariant(InsertItem(h,Null,'Item 2')),OleVariant(0)] := 1;
		CellState[OleVariant(InsertItem(h,Null,'Item 3')),OleVariant(0)] := 1;
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1930:
How can I use the CellData with ConditionalFormat/ComputedField/FormatColumn

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	Columns.Add('Items');
	with (IUnknown(Columns.Add('Format')) as EXG2ANTTLib_TLB.Column) do
	begin
		FormatColumn := '%CD0';
		Caption := FormatColumn;
		Def[EXG2ANTTLib_TLB.exCellForeColor] := OleVariant(8421504);
		Def[EXG2ANTTLib_TLB.exHeaderForeColor] := Def[EXG2ANTTLib_TLB.exCellForeColor];
	end;
	with Items do
	begin
		CellData[OleVariant(AddItem('Item 1')),OleVariant(0)] := OleVariant(1234);
		CellData[OleVariant(AddItem('Item 2')),OleVariant(0)] := 'this is just an user data';
		CellData[OleVariant(AddItem('Item 3')),OleVariant(0)] := '1/1/2001';
	end;
	EndUpdate();
end
1929:
How can I use the CellValue/CellCaption with ConditionalFormat/ComputedField/FormatColumn

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Items')) as EXG2ANTTLib_TLB.Column) do
	begin
		with Editor do
		begin
			EditType := EXG2ANTTLib_TLB.DropDownListType;
			AddItem(1,'Item 1',Null);
			AddItem(2,'Item 2',Null);
			AddItem(3,'Item 3',Null);
		end;
	end;
	with (IUnknown(Columns.Add('Format')) as EXG2ANTTLib_TLB.Column) do
	begin
		FormatColumn := '%0';
		Caption := FormatColumn;
		Def[EXG2ANTTLib_TLB.exCellForeColor] := OleVariant(8421504);
		Def[EXG2ANTTLib_TLB.exHeaderForeColor] := Def[EXG2ANTTLib_TLB.exCellForeColor];
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Format')) as EXG2ANTTLib_TLB.Column) do
	begin
		FormatColumn := '%C0';
		Caption := FormatColumn;
		Def[EXG2ANTTLib_TLB.exCellForeColor] := OleVariant(8421504);
		Def[EXG2ANTTLib_TLB.exHeaderForeColor] := Def[EXG2ANTTLib_TLB.exCellForeColor];
		AllowSizing := False;
	end;
	with Items do
	begin
		AddItem(OleVariant(1));
		CellValue[OleVariant(AddItem(OleVariant(0))),OleVariant(0)] := OleVariant(2);
		AddItem(OleVariant(2));
	end;
	EndUpdate();
end
1928:
How can I use the ShowNonworkingHours property (hide the non-working hours)

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exHour;
		NonworkingHours := 16253183;
		ShowNonworkingHours := False;
		ShowNonworkingUnits := False;
	end;
	EndUpdate();
end
1927:
How can I use the ShowNonworkingDates property (hide the non-working days)

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib_TLB.exDay;
		ShowNonworkingDates := False;
		ShowNonworkingUnits := False;
	end;
	EndUpdate();
end
1926:
How can I show/hide bars once the user checks or un-checks a column

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarTransparent] := 'cellstate(0) = 1 ? 0 : 100';
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarTransparent] := 'cellstate(0) = 1 ? 0 : 100';
	end;
	EndUpdate();
end
1925:
How can I change the color for all Task bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarColor] := OleVariant(65280);
	end;
	EndUpdate();
end
1924:
Is it possible to automatically select bars only when user selects a new item

// SelectionChanged event - Fired after a new item has been selected.
procedure TForm1.G2antt1SelectionChanged(ASender: TObject; );
begin
	with G2antt1 do
	begin
		with Items do
		begin
			ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarSelected] := 'itemisselected';
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	Columns.Add('Tasks');
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		AllowSelectObjects := EXG2ANTTLib_TLB.exNoSelectObjects;
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1923:
Is it possible to automatically select bars only when the user clicks the column's checkbox

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.G2antt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarSelected] := 'cellstate(0) = 1';
		end;
	end
end;

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		AllowSelectObjects := EXG2ANTTLib_TLB.exNoSelectObjects;
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1922:
How do I select all bars on leaf items

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['itemlevel = 1',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
1921:
How can I change the caption for all checked Task bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['(cellstate(0) = 1) and (itembar(0) = `Task`)',EXG2ANTTLib_TLB.exBarCaption] := '`new caption`';
	end;
	EndUpdate();
end
1920:
How can I change the caption for all Task bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['(itembar(0) = `Task`)',EXG2ANTTLib_TLB.exBarCaption] := '`new caption`';
	end;
	EndUpdate();
end
1919:
How can I change the caption for all bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarCaption] := '`new caption`';
	end;
	EndUpdate();
end
1918:
How can I move all Task bars to end at the same date time

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['(itembar(0) = `Task`)',EXG2ANTTLib_TLB.exBarMove] := '#8/14/2017# - itembar(2)';
	end;
	EndUpdate();
end
1917:
How can I move all Task bars to start at the same date time

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['(itembar(0) = `Task`)',EXG2ANTTLib_TLB.exBarMove] := '#8/3/2017# - itembar(1)';
	end;
	EndUpdate();
end
1916:
How can I change the color for checked Task bars

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['cellstate(0) = 1 and itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
	end;
	EndUpdate();
end
1915:
How do I resize all Task bars programatically

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarEnd] := 'value + 2';
	end;
	EndUpdate();
end
1914:
How do I move just the checked Task bars in the chart

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['cellstate(0) = 1 and itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarMove] := OleVariant(-2);
	end;
	EndUpdate();
end
1913:
How do I move all Task bars in the chart

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarMove] := OleVariant(1);
	end;
	EndUpdate();
end
1912:
How do I count all Task bars in the chart
with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	Columns.Add('Tasks');
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		OutputDebugString( ItemBarEx['itembar(0) = `Task`',EXG2ANTTLib_TLB.exBarsCount] );
	end;
	EndUpdate();
end
1911:
How do I select bars whose items are checked

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	SelBackColor := RGB(240,240,240);
	SelForeColor := RGB(0,0,0);
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			EndShape := EXG2ANTTLib_TLB.exShapeIconEmpty;
			Shape := EXG2ANTTLib_TLB.exShapeThinDown;
		end;
		SelBackColor := G2antt1.SelBackColor;
		SelBarColor := $808080;
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Null,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Null,Null);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Null,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		hChild := InsertItem(h,Null,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Null,Null);
		CellState[OleVariant(hChild),Null] := 1;
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Null);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		ItemBarEx['cellstate(0) = 1',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
1910:
How can I select all bars, where a specified column matches a specified criteria

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 48;
	Chart.SelBarColor := $ff;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1','K1');
		AddBar(h,'Task','1/5/2001','1/7/2001','K2','K2');
		AddBar(h,'Task','1/8/2001','1/10/2001','P','P');
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','Q','Q');
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','M','M');
		ItemBarEx['cellcaption(0) = `Task 1`',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
1909:
How can I select/unselect all bars

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 48;
	Chart.SelBarColor := $ff;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1','K1');
		AddBar(h,'Task','1/5/2001','1/7/2001','K2','K2');
		AddBar(h,'Task','1/8/2001','1/10/2001','P','P');
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','Q','Q');
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','M','M');
		ItemBarEx[OleVariant(True),EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
1908:
Is it possible to set the background color of the chart for one item and one day
with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Items');
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 96;
		FirstVisibleDate := '1/1/2001';
	end;
	with Items do
	begin
		AddItem('Item');
		h := AddItem('Item');
		AddBar(h,'','1/2/2001','1/3/2001','Back',' ');
		ItemBar[h,'Back',EXG2ANTTLib_TLB.exBarBackColor] := OleVariant(255);
		ItemBar[h,'Back',EXG2ANTTLib_TLB.exBarSelectable] := OleVariant(False);
		AddItem('Item');
	end;
	EndUpdate();
end
1907:
It is possible to search for an item ( inside the Editor ), case insensitive

with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('DropDownList')) as EXG2ANTTLib_TLB.Column).Editor do
	begin
		EditType := EXG2ANTTLib_TLB.DropDownListType;
		AddItem(1,'One',Null);
		AddItem(2,'Two',Null);
		AddItem(3,'Three',Null);
	end;
	with Items do
	begin
		AddItem(G2antt1.Columns.Item[OleVariant(0)].Editor.FindItem['>ONE']);
		AddItem(G2antt1.Columns.Item[OleVariant(0)].Editor.FindItem['>ThRee']);
		AddItem(G2antt1.Columns.Item[OleVariant(0)].Editor.FindItem['ONE']);
		AddItem(G2antt1.Columns.Item[OleVariant(0)].Editor.FindItem['>tWo']);
	end;
	EndUpdate();
end
1906:
The text after the BR-tag is in same line as the text before the BR-tag (entire column)

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Default')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
		Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
	end;
	with Items do
	begin
		AddItem('This is the first line.<br>This is the second line.');
		AddItem('This is the first line.<br>This is the second line.');
		AddItem('This is the first line.<br>This is the second line.');
	end;
	EndUpdate();
end
1905:
The text after the BR-tag is in same line as the text before the BR-tag (individual)

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exHLines;
	Chart.PaneWidth[True] := 0;
	Columns.Add('Default');
	with Items do
	begin
		CellValueFormat[OleVariant(AddItem('This is the first line.<br>This is the second line.')),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
		h := AddItem('<b>This is the first line.<br>This is the second line.</b>');
		CellValueFormat[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
		CellSingleLine[OleVariant(h),OleVariant(0)] := False;
		CellValueFormat[OleVariant(AddItem('This is the first line.<br>This is the second line.')),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
	end;
	EndUpdate();
end
1904:
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control

with G2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
		LevelCount := 2;
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
	end;
	BackColorAlternate := $7ff0f0f0;
	BackColorLevelHeader := BackColor;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/12/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/13/2001',Null,Null);
		AddBar(AddItem('Item 3'),'Task','1/2/2001','1/12/2001',Null,Null);
		AddBar(AddItem('Item 4'),'Task','1/3/2001','1/13/2001',Null,Null);
		AddBar(AddItem('Item 5'),'Task','1/2/2001','1/12/2001',Null,Null);
	end;
	EndUpdate();
end
1903:
Can I disable an item once the user selects a new value into a different item

// Change event - Occurs when the user changes the cell's content.
procedure TForm1.G2antt1Change(ASender: TObject; Item : HITEM;ColIndex : Integer;var NewValue : OleVariant);
begin
	with G2antt1 do
	begin
		with Items do
		begin
			EnableItem[ItemByIndex[1]] := False;
		end;
	end
end;

with G2antt1 do
begin
	FreezeEvents(True);
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	Columns.Add('Q');
	Columns.Add('A');
	with Items do
	begin
		h1 := AddItem('What''s your gender?');
		with CellEditor[OleVariant(h1),OleVariant(1)] do
		begin
			EditType := EXG2ANTTLib_TLB.DropDownListType;
			AddItem(1,'Male',Null);
			AddItem(0,'Female',Null);
		end;
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(1);
		h2 := AddItem('What''s pet name?');
		CellValue[OleVariant(h2),OleVariant(1)] := 'This is my pet favorite long long long name, that shoul break the line in multiple pieces';
		CellSingleLine[OleVariant(h2),OleVariant(1)] := False;
	end;
	EndUpdate();
	FreezeEvents(False);
end
1902:
How can I get a row expanded / enlarged to fit the cell's text (entire column)

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	Columns.Add('Q');
	with (IUnknown(Columns.Add('A')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
		with Editor do
		begin
			EditType := EXG2ANTTLib_TLB.MemoType;
			Appearance := EXG2ANTTLib_TLB.SingleApp;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('What''s name?');
		CellValue[OleVariant(h1),OleVariant(1)] := 'This is my pet favorite long long long name, that shoul break the line in multiple pieces';
		h2 := AddItem('What''s your pet name?');
		CellValue[OleVariant(h2),OleVariant(1)] := 'This is my pet favorite long long long name, that shoul break the line in multiple pieces';
	end;
	EndUpdate();
end
1901:
How can I get a row expanded / enlarged to fit the cell's text (individual cell)

with G2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
	Columns.Add('Q');
	Columns.Add('A');
	with Items do
	begin
		h1 := AddItem('What''s name?');
		CellValue[OleVariant(h1),OleVariant(1)] := 'This is my pet favorite long long long name, that shoul break the line in multiple pieces';
		h2 := AddItem('What''s your pet name?');
		with CellEditor[OleVariant(h2),OleVariant(1)] do
		begin
			EditType := EXG2ANTTLib_TLB.MemoType;
			Appearance := EXG2ANTTLib_TLB.SingleApp;
		end;
		CellValue[OleVariant(h2),OleVariant(1)] := 'This is my pet favorite long long long name, that shoul break the line in multiple pieces';
		CellSingleLine[OleVariant(h2),OleVariant(1)] := False;
	end;
	EndUpdate();
end