901:
How can I include the child items, when a filter is applied

with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := False;
	SearchColumnIndex := 1;
	Indent := 16;
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	FilterBarPromptVisible := True;
	FilterBarPromptPattern := 'Nancy';
	FilterInclude := EXGANTTLib_TLB.exItemsWithChilds;
	Chart.LevelCount := 2;
	with Columns do
	begin
		(IUnknown(Add('Name')) as EXGANTTLib_TLB.Column).Width := 96;
		(IUnknown(Add('Title')) as EXGANTTLib_TLB.Column).Width := 96;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := InsertItem(h0,Null,'Andrew Fuller');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
		h0 := InsertItem(h0,Null,'Michael Suyama');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Janet Leverling');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
		h0 := InsertItem(h0,Null,'Margaret Peacock');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
	end;
	ApplyFilter();
	EndUpdate();
end
900:
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 Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Date')) as EXGANTTLib_TLB.Column) do
	begin
		SortType := EXGANTTLib_TLB.SortDate;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		DisplayFilterDate := True;
		FilterList := Integer(EXGANTTLib_TLB.exShowFocusItem) Or Integer(EXGANTTLib_TLB.exShowCheckBox) Or Integer(EXGANTTLib_TLB.exSortItemsDesc);
	end;
	with (IUnknown(Columns.Add('DateTime')) as EXGANTTLib_TLB.Column) do
	begin
		SortType := EXGANTTLib_TLB.SortDateTime;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXGANTTLib_TLB.exShowFocusItem) Or Integer(EXGANTTLib_TLB.exShowCheckBox) Or Integer(EXGANTTLib_TLB.exSortItemsDesc);
	end;
	with (IUnknown(Columns.Add('Time')) as EXGANTTLib_TLB.Column) do
	begin
		SortType := EXGANTTLib_TLB.SortTime;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXGANTTLib_TLB.exShowFocusItem) Or Integer(EXGANTTLib_TLB.exShowCheckBox) Or Integer(EXGANTTLib_TLB.exSortItemsDesc);
		FormatColumn := 'time(value)';
	end;
	with (IUnknown(Columns.Add('Numeric')) as EXGANTTLib_TLB.Column) do
	begin
		SortType := EXGANTTLib_TLB.SortNumeric;
		DisplayFilterButton := True;
		FilterList := Integer(EXGANTTLib_TLB.exShowFocusItem) Or Integer(EXGANTTLib_TLB.exShowCheckBox) Or Integer(EXGANTTLib_TLB.exSortItemsDesc);
	end;
	with (IUnknown(Columns.Add('String')) as EXGANTTLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterList := Integer(EXGANTTLib_TLB.exShowFocusItem) Or Integer(EXGANTTLib_TLB.exShowCheckBox) Or Integer(EXGANTTLib_TLB.exSortItemsDesc);
	end;
	with Items do
	begin
		h := AddItem('1/27/2010');
		CellCaption[OleVariant(h),OleVariant(1)] := '1/27/2010 10:00:00 AM';
		CellCaption[OleVariant(h),OleVariant(2)] := CellCaption[OleVariant(h),OleVariant(1)];
		CellCaption[OleVariant(h),OleVariant(3)] := OleVariant(1);
		CellCaption[OleVariant(h),OleVariant(4)] := CellCaption[OleVariant(h),OleVariant(3)];
		h := AddItem('1/27/2011');
		CellCaption[OleVariant(h),OleVariant(1)] := '1/27/2011 9:00:00 AM';
		CellCaption[OleVariant(h),OleVariant(2)] := CellCaption[OleVariant(h),OleVariant(1)];
		CellCaption[OleVariant(h),OleVariant(3)] := OleVariant(11);
		CellCaption[OleVariant(h),OleVariant(4)] := CellCaption[OleVariant(h),OleVariant(3)];
		h := AddItem('11/2/2010');
		CellCaption[OleVariant(h),OleVariant(1)] := '11/2/2010 9:00:00 AM';
		CellCaption[OleVariant(h),OleVariant(2)] := CellCaption[OleVariant(h),OleVariant(1)];
		CellCaption[OleVariant(h),OleVariant(3)] := OleVariant(2);
		CellCaption[OleVariant(h),OleVariant(4)] := CellCaption[OleVariant(h),OleVariant(3)];
	end;
	Columns.Item['DateTime'].DisplayFilterDate := False;
	EndUpdate();
end
899:
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 Gantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('P1')) as EXGANTTLib_TLB.Column) do
	begin
		Def[EXGANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with (IUnknown(Columns.Add('P2')) as EXGANTTLib_TLB.Column) do
	begin
		Def[EXGANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
		FormatColumn := '1 index ``';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child A');
		InsertItem(h,Null,'Child B');
		InsertItem(h,Null,'Child A');
		InsertItem(h,Null,'Child B');
		AddItem('Root');
		AddItem('Root');
	end;
	SingleSort := False;
	Layout := 'multiplesort="C0:1 C1:2";collapse=""';
	EndUpdate();
end
898:
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 TForm1.Gantt1OLEStartDrag(ASender: TObject; Data : IExDataObject;var AllowedEffects : Integer);
begin
	// Data.SetData("data to drag")
	with Gantt1 do
	begin
		AllowedEffects := 1;
	end
end;

with Gantt1 do
begin
	OLEDropMode := EXGANTTLib_TLB.exOLEDropManual;
	Background[EXGANTTLib_TLB.exDragDropAfter] := $ffffff;
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
end
897:
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 Gantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	DrawGridLines := EXGANTTLib_TLB.exRowLines;
	AutoDrag := EXGANTTLib_TLB.exAutoDragPositionAny;
	HasLines := EXGANTTLib_TLB.exSolidLine;
	Indent := 16;
	MarkSearchColumn := False;
	with Columns do
	begin
		with (IUnknown(Add('')) as EXGANTTLib_TLB.Column) do
		begin
			Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(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,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
	end;
	EndUpdate();
end
896:
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 Gantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	GridLineColor := RGB(190,190,190);
	DrawGridLines := EXGANTTLib_TLB.exRowLines;
	AutoDrag := EXGANTTLib_TLB.exAutoDragPositionAny;
	HasLines := EXGANTTLib_TLB.exSolidLine;
	Indent := 16;
	with Columns do
	begin
		Add('Default');
		with (IUnknown(Add('')) as EXGANTTLib_TLB.Column) do
		begin
			Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
			Def[EXGANTTLib_TLB.exCellPaddingRight] := OleVariant(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,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
	end;
	EndUpdate();
end
895:
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 Gantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	DrawGridLines := EXGANTTLib_TLB.exRowLines;
	AutoDrag := EXGANTTLib_TLB.exAutoDragPositionAny;
	HasLines := EXGANTTLib_TLB.exSolidLine;
	Indent := 16;
	with Columns do
	begin
		Add('Default');
		with (IUnknown(Add('')) as EXGANTTLib_TLB.Column) do
		begin
			Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
			Def[EXGANTTLib_TLB.exCellPaddingRight] := OleVariant(4);
			Alignment := EXGANTTLib_TLB.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,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
	end;
	EndUpdate();
end
894:
Is it possible to have a different alignment for parts of the cell's caption

with Gantt1 do
begin
	BeginUpdate();
	TreeColumnIndex := -1;
	DrawGridLines := EXGANTTLib_TLB.exRowLines;
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Default')) as EXGANTTLib_TLB.Column) do
	begin
		Def[EXGANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
	end;
	with Items do
	begin
		CellHAlignment[OleVariant(AddItem('all-left')),OleVariant(0)] := EXGANTTLib_TLB.LeftAlignment;
		CellHAlignment[OleVariant(AddItem('all-center')),OleVariant(0)] := EXGANTTLib_TLB.CenterAlignment;
		CellHAlignment[OleVariant(AddItem('all-right')),OleVariant(0)] := EXGANTTLib_TLB.RightAlignment;
		h := AddItem('left<c>center<r>right');
		CellCaptionFormat[OleVariant(h),OleVariant(0)] := EXGANTTLib_TLB.exHTML;
	end;
	EndUpdate();
end
893:
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 Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		with (IUnknown(Add('MultipleLine')) as EXGANTTLib_TLB.Column) do
		begin
			Width := 32;
			Def[EXGANTTLib_TLB.exCellSingleLine] := OleVariant(False);
			Def[EXGANTTLib_TLB.exColumnResizeContiguously] := OleVariant(True);
		end;
		with (IUnknown(Add('SingleLine')) as EXGANTTLib_TLB.Column) do
		begin
			Def[EXGANTTLib_TLB.exCellSingleLine] := OleVariant(False);
		end;
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('This is a bit of long text that should break the line')),OleVariant(1)] := 'This is a bit of long text that should break the line';
	end;
	EndUpdate();
end
892:
How do I sort the index column as numeric

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			CellData[OleVariant(Item),OleVariant(1)] := OleVariant(ItemToIndex[Item]);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	DrawGridLines := EXGANTTLib_TLB.exAllLines;
	ColumnAutoResize := True;
	ShowFocusRect := False;
	with (IUnknown(Columns.Add('Next')) as EXGANTTLib_TLB.Column) do
	begin
		Def[EXGANTTLib_TLB.exCellPaddingLeft] := OleVariant(4);
		Def[EXGANTTLib_TLB.exHeaderPaddingLeft] := OleVariant(4);
	end;
	with (IUnknown(Columns.Add('Index')) as EXGANTTLib_TLB.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[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
		SortType := EXGANTTLib_TLB.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
891:
How can I put icons/images into buttons

with Gantt1 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 (IUnknown(Columns.Add('C+B')) as EXGANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `';
		Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
		Def[EXGANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXGANTTLib_TLB.exCellHasButton] := OleVariant(True);
		Def[EXGANTTLib_TLB.exCellButtonAutoWidth] := OleVariant(True);
	end;
	Columns.Add('');
	DrawGridLines := EXGANTTLib_TLB.exVLines;
	DefaultItemHeight := 20;
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
890:
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

// CellButtonClick event - Fired after the user clicks on the cell of button type. 
procedure TForm1.Gantt1CellButtonClick(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with Gantt1 do
	begin
			OutputDebugString( 'CellButtonClick' );
		OutputDebugString( Item );
	end
end;

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

with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	with (IUnknown(Columns.Add('')) as EXGANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 32;
		FormatColumn := '1 index ``';
	end;
	with (IUnknown(Columns.Add('Def')) as EXGANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '`     `';
		Def[EXGANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXGANTTLib_TLB.exCellHasButton] := OleVariant(True);
		Def[EXGANTTLib_TLB.exCellButtonAutoWidth] := OleVariant(True);
	end;
	Columns.Add('');
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
889:
Does filtering work with umlauts / accents characters
with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('Names')) as EXGANTTLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXGANTTLib_TLB.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[OleVariant(0)].Filter := '*ä*';
	ApplyFilter();
	EndUpdate();
end
888:
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := False;
	SearchColumnIndex := 1;
	FilterBarHeight := 0;
	FilterBarPromptVisible := True;
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		(IUnknown(Add('Name')) as EXGANTTLib_TLB.Column).Width := 96;
		(IUnknown(Add('Title')) as EXGANTTLib_TLB.Column).Width := 96;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Robert King');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
	end;
	FilterBarPromptPattern := 'London';
	EndUpdate();
end
887:
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 TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			SetParent(Item,FindItem[CellCaption[OleVariant(Item),'ReportsTo'],'EmployeeID',Null]);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.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,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Items.ExpandItem[0] := True;
	EndUpdate();
end
886:
The week number is not correct. What can I do

with Gantt1 do
begin
	with Chart do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
		LevelCount := 2;
		PaneWidth[False] := 0;
		UnitScale := EXGANTTLib_TLB.exWeek;
		UnitWidth := 32;
		FirstVisibleDate := '1/1/2016';
		WeekNumberAs := EXGANTTLib_TLB.exISO8601WeekNumber;
		ScrollTo(FirstVisibleDate,OleVariant(1));
	end;
end
885:
How can I display my logo on print/print-preview

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		PageOrientation := 2;
		HTMLPicture['logo'] := 'c:\exontrol\images\zipdisk.gif';
		ExtraCaption('logo','<img>logo</img>',OleVariant(1),OleVariant(1));
		PrintExt := (IUnknown(Gantt1.DefaultInterface) as EXGANTTLib_TLB.Gantt);
		Preview();
	end;
end
884:
How can I align captions of items with checkbox, with items with no checkbox

with Gantt1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	with Items do
	begin
		CellImages[OleVariant(AddItem(OleVariant(0))),OleVariant(0)] := '1';
		CellHasCheckBox[OleVariant(AddItem(OleVariant(1))),OleVariant(0)] := True;
		CellImages[OleVariant(AddItem(OleVariant(2))),OleVariant(0)] := '1';
	end;
	EndUpdate();
end
883:
How do I show the chart's labels in 24-hour clock format

with Gantt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2001';
		LevelCount := 3;
		with Level[0] do
		begin
			Label := '<%mmm%> <%d%>, <%yyyy%>';
			Alignment := Integer(EXGANTTLib_TLB.exHOutside) Or Integer(EXGANTTLib_TLB.CenterAlignment);
			Unit := EXGANTTLib_TLB.exDay;
		end;
		with Level[1] do
		begin
			Label := '<b><%h%>:00</b>';
			Alignment := EXGANTTLib_TLB.CenterAlignment;
			Unit := EXGANTTLib_TLB.exHour;
			DrawTickLines := True;
			DrawGridLines := True;
		end;
		with Level[2] do
		begin
			Label := '<%nn%>';
			Unit := EXGANTTLib_TLB.exMinute;
			Count := 15;
		end;
		ScrollTo('1/1/2001 8:30:00 AM',OleVariant(0));
	end;
end
882:
How do I show the chart's labels in 12-hour clock format

with Gantt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2001';
		LevelCount := 3;
		with Level[0] do
		begin
			Label := '<%mmm%> <%d%>, <%yyyy%>';
			Alignment := Integer(EXGANTTLib_TLB.exHOutside) Or Integer(EXGANTTLib_TLB.CenterAlignment);
			Unit := EXGANTTLib_TLB.exDay;
		end;
		with Level[1] do
		begin
			Label := '<b><%h%>:00</b> <%AM/PM%>';
			Alignment := EXGANTTLib_TLB.CenterAlignment;
			Unit := EXGANTTLib_TLB.exHour;
			DrawTickLines := True;
			DrawGridLines := True;
		end;
		with Level[2] do
		begin
			Label := '<%nn%>';
			Unit := EXGANTTLib_TLB.exMinute;
			Count := 15;
		end;
		ScrollTo('1/1/2001 8:30:00 AM',OleVariant(0));
	end;
end
881:
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button.
procedure TForm1.Gantt1MouseDown(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	// Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))
end;

with Gantt1 do
begin
	BeginUpdate();
	TreeColumnIndex := -1;
	SelForeColor := ForeColor;
	with (IUnknown(Columns.Add('Buttons')) as EXGANTTLib_TLB.Column) do
	begin
		Alignment := EXGANTTLib_TLB.CenterAlignment;
		Def[EXGANTTLib_TLB.exCellHasButton] := OleVariant(True);
	end;
	with Items do
	begin
		AddItem('Button A');
		AddItem('Button B');
		AddItem('Button C');
	end;
	EndUpdate();
end
880:
Do you have any Fit-To-Page options when printing the control (W x T, Fit-To )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		Options := 'FitToPage =1 x 2';
		PrintExt := (IUnknown(Gantt1.DefaultInterface) as EXGANTTLib_TLB.Gantt);
		Preview();
	end;
end
879:
Do you have any Fit-To-Page options when printing the control ( x T, Fit-To Tall )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		Options := 'FitToPage = x 2';
		PrintExt := (IUnknown(Gantt1.DefaultInterface) as EXGANTTLib_TLB.Gantt);
		Preview();
	end;
end
878:
Do you have any Fit-To-Page options when printing the control ( W x, Fit-To Wide )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		Options := 'FitToPage = 2 x';
		PrintExt := (IUnknown(Gantt1.DefaultInterface) as EXGANTTLib_TLB.Gantt);
		Preview();
	end;
end
877:
Do you have any Fit-To-Page options when printing the control ( percent view, Adjust-To )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		Options := 'FitToPage = 50%';
		PrintExt := (IUnknown(Gantt1.DefaultInterface) as EXGANTTLib_TLB.Gantt);
		Preview();
	end;
end
876:
Does the title of the cell's tooltip supports HTML format

with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('')) as EXGANTTLib_TLB.Column) do
	begin
		Caption := '';
		HTMLCaption := 'Column';
	end;
	with Items do
	begin
		CellToolTip[OleVariant(AddItem('tooltip w/h different title')),OleVariant(0)] := '<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that''s shown when the user hovers the cell. This shows the titl' + 
	'e centered with a different color.';
	end;
	EndUpdate();
end
875:
How do I specify a different title for the cell's tooltip

with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (IUnknown(Columns.Add('')) as EXGANTTLib_TLB.Column) do
	begin
		Caption := 'This is the title';
		HTMLCaption := 'Column';
	end;
	with Items do
	begin
		CellToolTip[OleVariant(AddItem('tooltip w/h different title')),OleVariant(0)] := 'This is bit of text that''s shown when the user hovers the cell.';
	end;
	EndUpdate();
end
874:
The cell's tooltip displays the column's caption in its title. How can I get ride of that

with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('C1');
		Add('C2');
	end;
	with Items do
	begin
		h := AddItem('tooltip w/h caption');
		CellToolTip[OleVariant(h),OleVariant(0)] := 'This is bit of text that''s shown when the user hovers the cell. This shows the column''s caption in the title.';
		CellCaption[OleVariant(h),OleVariant(1)] := 'tooltip no caption';
		CellToolTip[OleVariant(h),OleVariant(1)] := 'This is bit of text that''s shown when the user hovers the cell. This shows no column''s caption in the title.';
	end;
	with Columns.Item['C2'] do
	begin
		HTMLCaption := Caption;
		Caption := '';
	end;
	EndUpdate();
end
873:
How can I programmatically show the column's filter

// RClick event - Fired when right mouse button is clicked
procedure TForm1.Gantt1RClick(ASender: TObject; );
begin
	with Gantt1 do
	begin
		i := ItemFromPoint[-1,-1,c,hit];
		Columns.Item[OleVariant(c)].ShowFilter('-1,-1,128,128');
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	with (IUnknown(Columns.Add('Items ')) as EXGANTTLib_TLB.Column) do
	begin
		DisplayFilterPattern := False;
		FilterList := Integer(EXGANTTLib_TLB.exShowExclude) Or Integer(EXGANTTLib_TLB.exShowFocusItem) Or Integer(EXGANTTLib_TLB.exShowCheckBox);
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	EndUpdate();
end
872:
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

// ColumnClick event - Fired after the user clicks on column's header.
procedure TForm1.Gantt1ColumnClick(ASender: TObject; Column : IColumn);
begin
	// Column.SortOrder = 1
	with Gantt1 do
	begin
		SortOnClick := EXGANTTLib_TLB.exDefaultSort;
		Columns.Item['Sort'].SortOrder := EXGANTTLib_TLB.SortAscending;
		SortOnClick := EXGANTTLib_TLB.exUserSort;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SortOnClick := EXGANTTLib_TLB.exUserSort;
	Columns.Add('Items');
	(IUnknown(Columns.Add('Sort')) as EXGANTTLib_TLB.Column).Visible := False;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Item 1 (3)')),OleVariant(1)] := OleVariant(3);
		CellCaption[OleVariant(AddItem('Item 2 (1)')),OleVariant(1)] := OleVariant(1);
		CellCaption[OleVariant(AddItem('Item 3 (2)')),OleVariant(1)] := OleVariant(2);
	end;
	EndUpdate();
end
871:
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

// ColumnClick event - Fired after the user clicks on column's header.
procedure TForm1.Gantt1ColumnClick(ASender: TObject; Column : IColumn);
begin
	// Column.SortOrder = 1
	with Gantt1 do
	begin
		Items.SortChildren(0,'Sort',True);
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SortOnClick := EXGANTTLib_TLB.exUserSort;
	Columns.Add('Items');
	(IUnknown(Columns.Add('Sort')) as EXGANTTLib_TLB.Column).Visible := False;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Item 1 (3)')),OleVariant(1)] := OleVariant(3);
		CellCaption[OleVariant(AddItem('Item 2 (1)')),OleVariant(1)] := OleVariant(1);
		CellCaption[OleVariant(AddItem('Item 3 (2)')),OleVariant(1)] := OleVariant(2);
	end;
	EndUpdate();
end
870:
How can I sort by two-columns, one by date and one by time

with Gantt1 do
begin
	BeginUpdate();
	SingleSort := False;
	with Columns do
	begin
		(IUnknown(Add('Index')) as EXGANTTLib_TLB.Column).FormatColumn := '1 index ``';
		(IUnknown(Add('Date')) as EXGANTTLib_TLB.Column).SortType := EXGANTTLib_TLB.SortDate;
		with (IUnknown(Add('Time')) as EXGANTTLib_TLB.Column) do
		begin
			SortType := EXGANTTLib_TLB.SortTime;
			FormatColumn := 'time(value)';
		end;
	end;
	with Items do
	begin
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '1/1/2001';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 10:00:00 AM';
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '12/31/2000';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 10:00:00 AM';
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '1/1/2001';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 6:00:00 AM';
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '12/31/2000';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 8:00:00 AM';
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '1/1/2001';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 8:00:00 AM';
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '12/31/2000';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 6:00:00 AM';
	end;
	Layout := 'multiplesort="C1:1 C2:1"';
	EndUpdate();
end
869:
How can I connect to a DBF file
with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Select * From foxcode.DBF','Provider=vfpoledb;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Chart.PaneWidth[True] := 0;
	EndUpdate();
end
868:
How can I change the bar's color based on values on the columns

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib_TLB.exDay;
		FirstWeekDay := EXGANTTLib_TLB.exMonday;
		OverviewVisible := EXGANTTLib_TLB.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	with ConditionalFormats do
	begin
		with Add('1',Null) do
		begin
			ApplyTo := EXGANTTLib_TLB.FormatApplyToEnum($1);
			Bold := True;
			BackColor := $fafafa;
		end;
		with Add('%1 = 5',Null) do
		begin
			ApplyToBars := 'Task';
			BarColor := $ff;
			ForeColor := $ff;
			BarOverviewColor := $ff;
		end;
		with Add('%1 = 3',Null) do
		begin
			ApplyToBars := 'Task';
			BarColor := $ff00;
			ForeColor := $ff00;
			BarOverviewColor := $ff00;
		end;
	end;
	EndUpdate();
end
867:
Does your control supports scrolling by touching the screen

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib_TLB.exDay;
		FirstWeekDay := EXGANTTLib_TLB.exMonday;
		OverviewVisible := EXGANTTLib_TLB.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	ContinueColumnScroll := True;
	ScrollBySingleLine := True;
	AutoDrag := Integer(EXGANTTLib_TLB.exAutoDragScrollOnShortTouch) Or Integer(EXGANTTLib_TLB.exAutoDragScroll);
	EndUpdate();
end
866:
How can I export the control's content to a PDF document (method 1)

with Gantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		PaneWidth[False] := 196;
		LevelCount := 2;
		ShowEmptyBars := 1;
		FirstVisibleDate := '1/1/2009';
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2009','1/7/2009',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/4/2009','1/9/2009',Null,Null);
	end;
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		PrintExt := (IUnknown(Gantt1.DefaultInterface) as EXGANTTLib_TLB.Gantt);
		CopyTo('c:/temp/xtest.pdf');
	end;
	OutputDebugString( 'Look for C:\Temp\xtest.pdf file.' );
	EndUpdate();
end
865:
How can I export the control's content to a PDF document (method 2)

with Gantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		PaneWidth[False] := 196;
		LevelCount := 2;
		ShowEmptyBars := 1;
		FirstVisibleDate := '1/1/2009';
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2009','1/7/2009',Null,Null);
		AddBar(AddItem('Task 2'),'Task','1/4/2009','1/9/2009',Null,Null);
	end;
	var_CopyTo := CopyTo['c:/temp/xtest.pdf'];
	OutputDebugString( 'Look for C:\Temp\xtest.pdf file.' );
	EndUpdate();
end
864:
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.Gantt1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			CellCaption[OleVariant(Item),OleVariant(2)] := OleVariant(CellState[OleVariant(Item),OleVariant(0)]);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	SelBackMode := EXGANTTLib_TLB.exTransparent;
	var_ConditionalFormat := ConditionalFormats.Add('%2 != 0',Null);
	with var_ConditionalFormat do
	begin
		Bold := True;
		ForeColor := $ff;
		ApplyTo := EXGANTTLib_TLB.exFormatToItems;
	end;
	with (IUnknown(Columns.Add('')) as EXGANTTLib_TLB.Column) do
	begin
		Def[EXGANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		Width := 16;
		AllowSizing := False;
	end;
	Columns.Add('Information');
	(IUnknown(Columns.Add('Hidden')) as EXGANTTLib_TLB.Column).Visible := False;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('')),OleVariant(1)] := 'This is a bit of text associated';
		h := AddItem('');
		CellCaption[OleVariant(h),OleVariant(1)] := 'This is a bit of text associated';
		CellState[OleVariant(h),OleVariant(0)] := 1;
		CellCaption[OleVariant(AddItem('')),OleVariant(1)] := 'This is a bit of text associated';
	end;
	EndUpdate();
end
863:
How can I use no scroll bars for touch-screens

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib_TLB.exDay;
		FirstWeekDay := EXGANTTLib_TLB.exMonday;
		OverviewVisible := EXGANTTLib_TLB.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	AutoDrag := EXGANTTLib_TLB.exAutoDragScroll;
	ScrollWidth := 4;
	ScrollHeight := 4;
	Background[EXGANTTLib_TLB.exHSLeft] := $c0c0c0;
	Background[EXGANTTLib_TLB.exHSRight] := $c0c0c0;
	Background[EXGANTTLib_TLB.exHSBack] := $e0e0e0;
	Background[EXGANTTLib_TLB.exHSThumb] := $808080;
	Background[EXGANTTLib_TLB.exVSBack] := $e0e0e0;
	Background[EXGANTTLib_TLB.exVSDown] := $c0c0c0;
	Background[EXGANTTLib_TLB.exVSThumb] := $808080;
	Background[EXGANTTLib_TLB.exVSUp] := $c0c0c0;
	ScrollButtonWidth := 0;
	ScrollButtonHeight := 0;
	EndUpdate();
end
862:
How can I print the selected items only

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	SingleSel := False;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	with Items do
	begin
		SelectItem[ItemByIndex[0]] := True;
		SelectItem[ItemByIndex[2]] := True;
		SelectItem[ItemByIndex[4]] := True;
	end;
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		Options := 'Print = Selection';
		PrintExt := (IUnknown(Gantt1.DefaultInterface) as EXGANTTLib_TLB.Gantt);
		Preview();
	end;
end
861:
How can I sort the columns to be displayed on the columns floating bar

with Gantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		(IUnknown(Add('City')) as EXGANTTLib_TLB.Column).Visible := False;
		(IUnknown(Add('Start')) as EXGANTTLib_TLB.Column).Visible := False;
		(IUnknown(Add('End')) as EXGANTTLib_TLB.Column).Visible := False;
	end;
	ColumnsFloatBarVisible := True;
	ColumnsFloatBarSortOrder := EXGANTTLib_TLB.SortAscending;
end
860:
How can I add a vertical padding

with Gantt1 do
begin
	BeginUpdate();
	DrawGridLines := EXGANTTLib_TLB.exAllLines;
	with (IUnknown(Columns.Add('Padding')) as EXGANTTLib_TLB.Column) do
	begin
		Def[EXGANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXGANTTLib_TLB.exCellSingleLine] := OleVariant(False);
		Def[EXGANTTLib_TLB.exCellPaddingLeft] := OleVariant(6);
		Def[EXGANTTLib_TLB.exCellPaddingRight] := OleVariant(6);
		Def[EXGANTTLib_TLB.exCellPaddingTop] := OleVariant(6);
		Def[EXGANTTLib_TLB.exCellPaddingBottom] := OleVariant(6);
	end;
	with Items do
	begin
		AddItem('padding');
		AddItem('padding');
	end;
	EndUpdate();
end
859:
How do you embed HTML options into the anchor click string

// AnchorClick event - Occurs when an anchor element is clicked.
procedure TForm1.Gantt1AnchorClick(ASender: TObject; AnchorID : WideString;Options : WideString);
begin
	with Gantt1 do
	begin
		OutputDebugString( AnchorID );
		OutputDebugString( Options );
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		(IUnknown(Add('Car')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
	end;
	with Items do
	begin
		AddItem('<a mazda_1;options for 1>Mazda <b>1</b></a>');
		AddItem('<a mazda_2;options for 2>Mazda <b>2</b></a>');
		AddItem('<a mazda_3;options for 3a>Mazda <b>3.a</b></a>');
		AddItem('<a mazda_3;options for 3b>Mazda <b>3.b</b></a>');
	end;
	EndUpdate();
end
858:
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

with Gantt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78eg' + 
	'BHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRxL' + 
	'C8Mw3BDvYDkOAABAIgI=');
	SelBackColor := $1fffffe;
	ShowFocusRect := False;
	Columns.Add('Items');
	with Items do
	begin
		ItemBackColor[AddItem('red')] := $ff;
		ItemBackColor[AddItem('blue')] := $ff0000;
		ItemBackColor[AddItem('green')] := $ff00;
	end;
	EndUpdate();
end
857:
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

with Gantt1 do
begin
	BeginUpdate();
	SelBackMode := EXGANTTLib_TLB.exTransparent;
	ShowFocusRect := False;
	Columns.Add('Items');
	with Items do
	begin
		ItemBackColor[AddItem('red')] := $ff;
		ItemBackColor[AddItem('blue')] := $ff0000;
		ItemBackColor[AddItem('green')] := $ff00;
	end;
	EndUpdate();
end
856:
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

with Gantt1 do
begin
	BeginUpdate();
	SelBackColor := BackColor;
	SelForeColor := ForeColor;
	ShowFocusRect := True;
	Columns.Add('Items');
	with Items do
	begin
		ItemBackColor[AddItem('red')] := $ff;
		ItemBackColor[AddItem('blue')] := $ff0000;
		ItemBackColor[AddItem('green')] := $ff00;
	end;
	EndUpdate();
end
855:
Do you have any Fit-To-Page options when printing the control

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Chart.FirstVisibleDate := '8/4/1994';
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		Options := 'FitToPage = On';
		PrintExt := (IUnknown(Gantt1.DefaultInterface) as EXGANTTLib_TLB.Gantt);
		Preview();
	end;
end
854:
How can I add a footer row

with Gantt1 do
begin
	ShowLockedItems := True;
	DrawGridLines := EXGANTTLib_TLB.exVLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		LockedItemCount[EXGANTTLib_TLB.BottomAlignment] := 1;
		h := LockedItem[EXGANTTLib_TLB.BottomAlignment,0];
		ItemBackColor[h] := $808080;
		ItemForeColor[h] := $ffffff;
		CellCaption[OleVariant(h),OleVariant(0)] := 'footer c1';
		CellCaption[OleVariant(h),OleVariant(1)] := 'footer c2';
		CellCaption[OleVariant(AddItem('cell')),OleVariant(1)] := 'cell';
	end;
end
853:
How can I add a header row

with Gantt1 do
begin
	ShowLockedItems := True;
	DrawGridLines := EXGANTTLib_TLB.exVLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		LockedItemCount[EXGANTTLib_TLB.TopAlignment] := 1;
		h := LockedItem[EXGANTTLib_TLB.TopAlignment,0];
		ItemBackColor[h] := $808080;
		ItemForeColor[h] := $ffffff;
		CellCaption[OleVariant(h),OleVariant(0)] := 'footer c1';
		CellCaption[OleVariant(h),OleVariant(1)] := 'footer c2';
		CellCaption[OleVariant(AddItem('cell')),OleVariant(1)] := 'cell';
	end;
end
852:
How can I programmatically add more columns to the sort bar and other to be sorted, but not included in the sort bar

with Gantt1 do
begin
	SortBarVisible := True;
	with Columns do
	begin
		Add(0);
		Add(1);
		Add(2);
		Add(3);
		Add(4);
	end;
	Layout := 'multiplesort="C3:1 C4:2";singlesort="C2:1"';
end
851:
How can I fix a column, while other sizable and fill the control's client
with Gantt1 do
begin
	ColumnAutoResize := True;
	Columns.Add('Sizable');
	with (IUnknown(Columns.Add('F')) as EXGANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 16;
	end;
end
850:
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares

with Gantt1 do
begin
	with Columns do
	begin
		Add('Value');
		with (IUnknown(Add('CellSingleLine = False')) as EXGANTTLib_TLB.Column) do
		begin
			ComputedField := '%0';
			Def[EXGANTTLib_TLB.exCellSingleLine] := OleVariant(False);
		end;
		with (IUnknown(Add('FormatColumn/replace CRLF')) as EXGANTTLib_TLB.Column) do
		begin
			ComputedField := '%0';
			FormatColumn := 'value replace `\r\n` with ``';
		end;
		with (IUnknown(Add('FormatColumn/replace TAB,CRLF')) as EXGANTTLib_TLB.Column) do
		begin
			ComputedField := '%0';
			FormatColumn := '(value replace `\t` with ``) replace `\r\n` with ``';
		end;
	end;
	with Items do
	begin
		AddItem('a\ta\r\nb\tb');
	end;
end
849:
Is there any way to "unselect" radio group

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
procedure TForm1.Gantt1DblClick(ASender: TObject; Shift : Smallint;X : Integer;Y : Integer);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			h := CellChecked[1234];
			CellHasCheckBox[OleVariant(0),OleVariant(h)] := True;
			CellState[OleVariant(0),OleVariant(h)] := 0;
			CellHasCheckBox[OleVariant(0),OleVariant(h)] := False;
		end;
	end
end;

// SelectionChanged event - Fired after a new item has been selected.
procedure TForm1.Gantt1SelectionChanged(ASender: TObject; );
begin
	with Gantt1 do
	begin
		with Items do
		begin
			CellState[OleVariant(FocusItem),OleVariant(0)] := 1;
		end;
	end
end;

with Gantt1 do
begin
	MarkSearchColumn := False;
	SelBackColor := RGB(255,255,128);
	SelForeColor := RGB(0,0,0);
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Radio 1');
		CellHasRadioButton[OleVariant(h),OleVariant(0)] := True;
		CellRadioGroup[OleVariant(h),OleVariant(0)] := 1234;
		h := AddItem('Radio 2');
		CellHasRadioButton[OleVariant(h),OleVariant(0)] := True;
		CellRadioGroup[OleVariant(h),OleVariant(0)] := 1234;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		h := AddItem('Radio 3');
		CellHasRadioButton[OleVariant(h),OleVariant(0)] := True;
		CellRadioGroup[OleVariant(h),OleVariant(0)] := 1234;
	end;
end
848:
The Column.Alignment property does not seem to work for cells with images in them. What can be done

with Gantt1 do
begin
	BeginUpdate();
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	TreeColumnIndex := -1;
	DrawGridLines := EXGANTTLib_TLB.exAllLines;
	HeaderHeight := 24;
	DefaultItemHeight := 24;
	with (IUnknown(Columns.Add('Image')) as EXGANTTLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 32;
		HTMLCaption := '<img>1</img>';
		HeaderAlignment := EXGANTTLib_TLB.CenterAlignment;
		Alignment := EXGANTTLib_TLB.CenterAlignment;
		Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
	end;
	Columns.Add('Rest');
	with Items do
	begin
		AddItem('<img>1</img>');
		AddItem('<img>2</img>');
		AddItem('<img>3</img>');
	end;
	EndUpdate();
end
847:
Does your control support subscript or superscript, in HTML captions

with Gantt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Item 1');
		AddBar(h,'Task','1/2/2001','1/4/2001','',Null);
		ItemBar[h,'',EXGANTTLib_TLB.exBarCaption] := '<sha ;;0>Event <b><font ;6><off -6>2<off 4>3<off 4>1';
		ItemBar[h,'',EXGANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
	end;
end
846:
How do I arrange my columns on multiple levels

with Gantt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	DrawGridLines := EXGANTTLib_TLB.exAllLines;
	with Columns do
	begin
		with (IUnknown(Add('C0')) as EXGANTTLib_TLB.Column) do
		begin
			ExpandColumns := '1,2';
			DisplayExpandButton := False;
		end;
		Add('C1');
		Add('C2');
		Add('C3');
		with (IUnknown(Add('C4')) as EXGANTTLib_TLB.Column) do
		begin
			ExpandColumns := '5,6';
			DisplayExpandButton := False;
		end;
		Add('C5');
		with (IUnknown(Add('C6')) as EXGANTTLib_TLB.Column) do
		begin
			ExpandColumns := '6,7';
			DisplayExpandButton := False;
		end;
		Add('C7');
	end;
	EndUpdate();
end
845:
Does your control support expandable header or columns, so I can arrange it on multiple levels

with Gantt1 do
begin
	BeginUpdate();
	DrawGridLines := EXGANTTLib_TLB.exAllLines;
	BackColorLevelHeader := RGB(240,240,240);
	with Columns do
	begin
		with (IUnknown(Add('Photo')) as EXGANTTLib_TLB.Column) do
		begin
			AllowSizing := False;
			Width := 32;
		end;
		Add('Personal Info');
		Add('Title');
		Add('Name');
		Add('First');
		Add('Last');
		Add('Address');
		Item['Personal Info'].ExpandColumns := '2,3';
		with Item['Name'] do
		begin
			ExpandColumns := '4,5';
			Expanded := False;
		end;
	end;
	EndUpdate();
end
844:
Can I change the format of date to be shown in the control

with Gantt1 do
begin
	Chart.PaneWidth[True] := 0;
	with Columns do
	begin
		Add('Default');
		with (IUnknown(Add('Format.1')) as EXGANTTLib_TLB.Column) do
		begin
			ComputedField := '%0';
			FormatColumn := 'dateF(value) replace `/` with `-`';
		end;
		with (IUnknown(Add('Format.2')) as EXGANTTLib_TLB.Column) do
		begin
			ComputedField := '%0';
			Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
			FormatColumn := '`<b>`+ shortdate(value) + `</b> ` + timeF(value)';
		end;
		with (IUnknown(Add('Format.3')) as EXGANTTLib_TLB.Column) do
		begin
			ComputedField := '%0';
			Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
			FormatColumn := '` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `Fr`; 6 : `Sa`) ) + `</b> ` + ( dateF(valu' + 
	'e) replace `/` with `-` )';
		end;
	end;
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('1/2/2001 10:00:00 AM');
	end;
end
843:
How can I remove all bars from the chart
with Gantt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Null);
		ClearBars(0);
	end;
end
842:
How can I change the color for all bars with a specified key

with Gantt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Null);
		ItemBar[0,'K1',EXGANTTLib_TLB.exBarColor] := OleVariant(255);
	end;
end
841:
Is there any automatic way to change a property for all bars with a specified key

with Gantt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Null);
		ItemBar[0,'K1',EXGANTTLib_TLB.exBarColor] := OleVariant(255);
	end;
end
840:
How can I remove all bars with specified key

with Gantt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Null);
		RemoveBar(0,'K1');
	end;
end
839:
How can I find if there is any filter applied to the control

// FilterChange event - Occurs when the filter was changed.
procedure TForm1.Gantt1FilterChange(ASender: TObject; );
begin
	with Gantt1 do
	begin
		OutputDebugString( 'If negative, the filter is present, else not' );
		OutputDebugString( Items.VisibleItemCount );
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	TreeColumnIndex := -1;
	FilterInclude := EXGANTTLib_TLB.exMatchingItemsOnly;
	with (IUnknown(Columns.Add('Column')) as EXGANTTLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXGANTTLib_TLB.exFilter;
		Filter := 'C1';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
	end;
	ApplyFilter();
	EndUpdate();
end
838:
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

with Gantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	TreeColumnIndex := -1;
	FilterInclude := EXGANTTLib_TLB.exMatchingItemsOnly;
	with (IUnknown(Columns.Add('Column')) as EXGANTTLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXGANTTLib_TLB.exFilter;
		Filter := 'C1|C2';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
	end;
	ApplyFilter();
	EndUpdate();
end
837:
Is there any method to get only the matched items and not the items with his parent

with Gantt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	FilterInclude := EXGANTTLib_TLB.exMatchingItemsOnly;
	with (IUnknown(Columns.Add('Column')) as EXGANTTLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXGANTTLib_TLB.exFilter;
		Filter := 'C1|C2';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
	end;
	ApplyFilter();
	EndUpdate();
end
836:
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)

with Gantt1 do
begin
	BeginUpdate();
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	Layout := 'Select="0";SingleSort="C0:2";Columns=1';
	EndUpdate();
end
835:
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)

with Gantt1 do
begin
	BeginUpdate();
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	Layout := 'gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAGQ' + 
	'Aqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0j' + 
	'E3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI=';
	EndUpdate();
end
834:
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance

with Gantt1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Columns do
	begin
		Add('Column 1');
		Add('Column 2');
	end;
	BackColorHeader := $1000000;
	Background[EXGANTTLib_TLB.exCursorHoverColumn] := $12d86ff;
end
833:
Is it possible to change the visual appearance of the columns selector/floating bar(3)

with Gantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXGANTTLib_TLB.Column).Visible := False;
	end;
	VisualAppearance.Add(2,'c:\exontrol\images\normal.ebn');
	VisualAppearance.Add(3,'c:\exontrol\images\pushed.ebn');
	Background[EXGANTTLib_TLB.exColumnsFloatAppearance] := $2000000;
	Background[EXGANTTLib_TLB.exColumnsFloatBackColor] := $3000000;
	Background[EXGANTTLib_TLB.exColumnsFloatCaptionBackColor] := $f0f5f6;
	ColumnsFloatBarVisible := True;
end
832:
Is it possible to change the visual appearance of the columns selector/floating bar(2)

with Gantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXGANTTLib_TLB.Column).Visible := False;
	end;
	VisualAppearance.Add(3,'c:\exontrol\images\pushed.ebn');
	Background[EXGANTTLib_TLB.exColumnsFloatBackColor] := $3000000;
	ColumnsFloatBarVisible := True;
end
831:
Is it possible to change the visual appearance of the columns selector/floating bar(1)

with Gantt1 do
begin
	VisualAppearance.Add(2,'c:\exontrol\images\normal.ebn');
	Background[EXGANTTLib_TLB.exColumnsFloatAppearance] := $2000000;
	Background[EXGANTTLib_TLB.exColumnsFloatBackColor] := $f0f5f6;
	Background[EXGANTTLib_TLB.exColumnsFloatCaptionBackColor] := $f0f5f6;
	ColumnsFloatBarVisible := True;
end
830:
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list

with Gantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXGANTTLib_TLB.Column).Visible := False;
	end;
	ColumnsFloatBarVisible := True;
end
829:
Is it possible to list a column to columns selector/floating bar, but still user can use it

with Gantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXGANTTLib_TLB.Column).Visible := False;
		with (IUnknown(Add('Column 3')) as EXGANTTLib_TLB.Column) do
		begin
			Visible := False;
			Enabled := False;
		end;
	end;
	ColumnsFloatBarVisible := True;
end
828:
How can I prevent a specific column not to be listed in the columns selector/floating bar

with Gantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXGANTTLib_TLB.Column).Visible := False;
		with (IUnknown(Add('Column 3')) as EXGANTTLib_TLB.Column) do
		begin
			Visible := False;
			AllowDragging := False;
		end;
	end;
	ColumnsFloatBarVisible := True;
end
827:
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar

with Gantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXGANTTLib_TLB.Column).Visible := False;
	end;
	Description[EXGANTTLib_TLB.exColumnsFloatBar] := 'Hidden Columns';
	ColumnsFloatBarVisible := True;
end
826:
How can I show the columns selector, so the user can drag and drop columns to the view

with Gantt1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXGANTTLib_TLB.Column).Visible := False;
	end;
	ColumnsFloatBarVisible := True;
end
825:
The column's header is changed while the cursor hovers it. Is it possible to prevent that

with Gantt1 do
begin
	with Columns do
	begin
		Add('Column 1');
		Add('Column 2');
	end;
	Background[EXGANTTLib_TLB.exCursorHoverColumn] := $ffffffff;
end
824:
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area

with Gantt1 do
begin
	BeginUpdate();
	ScrollBars := EXGANTTLib_TLB.exDisableBoth;
	Chart.ToolTip := '';
	ScrollPartVisible[EXGANTTLib_TLB.exVScroll,EXGANTTLib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXGANTTLib_TLB.exHScroll,EXGANTTLib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXGANTTLib_TLB.exHChartScroll,EXGANTTLib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXGANTTLib_TLB.exVSBack] := $f0f0f0;
	Background[EXGANTTLib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXGANTTLib_TLB.exHSBack] := Background[EXGANTTLib_TLB.exVSBack];
	Background[EXGANTTLib_TLB.exHSThumb] := Background[EXGANTTLib_TLB.exVSThumb];
	Background[EXGANTTLib_TLB.exScrollSizeGrip] := Background[EXGANTTLib_TLB.exVSBack];
	EndUpdate();
end
823:
How can I display the Year in Thai, Buddhist, Korean format

with Gantt1 do
begin
	with Chart do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
		LevelCount := 2;
		PaneWidth[False] := 0;
		UnitScale := EXGANTTLib_TLB.exDay;
		with Level[0] do
		begin
			Label := '<%mmmm%> <%d%>, <%loc_yyyy%> <r><%ww%>';
			Unit := EXGANTTLib_TLB.exWeek;
			ToolTip := Label;
		end;
		ToolTip := '<%ddd%> <%m%>/<%d%>/<%loc_yyyy%>';
	end;
	Description[EXGANTTLib_TLB.exFilterBarDateMonths] := Chart.MonthNames;
end
822:
How does localization work

with Gantt1 do
begin
	with Chart do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
		LevelCount := 2;
		PaneWidth[False] := 0;
	end;
end
821:
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	MarkSearchColumn := False;
	with Columns do
	begin
		with (IUnknown(Add('Car')) as EXGANTTLib_TLB.Column) do
		begin
			DisplayFilterButton := True;
			FilterType := EXGANTTLib_TLB.exFilter;
			Filter := 'MAZDA';
		end;
		with (IUnknown(Add('Equipment')) as EXGANTTLib_TLB.Column) do
		begin
			DisplayFilterButton := True;
			DisplayFilterPattern := False;
			CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*';
			FilterType := EXGANTTLib_TLB.exPattern;
			Filter := 'AIR BAG';
		end;
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag';
		CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition';
		CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition';
		CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP';
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP';
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP';
	end;
	ApplyFilter();
	EndUpdate();
end
820:
How can I have a case-sensitive filter

with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	MarkSearchColumn := False;
	with Columns do
	begin
		with (IUnknown(Add('Car')) as EXGANTTLib_TLB.Column) do
		begin
			DisplayFilterButton := True;
			FilterType := Integer(EXGANTTLib_TLB.exFilterDoCaseSensitive) Or Integer(EXGANTTLib_TLB.exFilter);
			Filter := 'Mazda';
		end;
		with (IUnknown(Add('Equipment')) as EXGANTTLib_TLB.Column) do
		begin
			DisplayFilterButton := True;
			DisplayFilterPattern := False;
			CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*';
			FilterType := Integer(EXGANTTLib_TLB.exFilterDoCaseSensitive) Or Integer(EXGANTTLib_TLB.exPattern);
			Filter := 'Air Bag';
		end;
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag';
		CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition';
		CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition';
		CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP';
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP';
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP';
	end;
	ApplyFilter();
	EndUpdate();
end
819:
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings

// SelectionChanged event - Fired after a new item has been selected.
procedure TForm1.Gantt1SelectionChanged(ASender: TObject; );
begin
	with Gantt1 do
	begin
		with Items do
		begin
			ClearItemBackColor(0);
			ItemBackColor[SelectedItem[0]] := $ffff80;
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SelForeColor := ForeColor;
	SelBackColor := BackColor;
	ShowFocusRect := False;
	with Columns do
	begin
		with (IUnknown(Add('Format')) as EXGANTTLib_TLB.Column) do
		begin
			FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' + 
	'0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )';
			Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
		end;
	end;
	with Items do
	begin
		AddItem(OleVariant(10));
		AddItem(OleVariant(-8));
	end;
	EndUpdate();
end
818:
How do I hide the selection
with Gantt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SelForeColor := ForeColor;
	SelBackColor := BackColor;
	ShowFocusRect := False;
	with Columns do
	begin
		with (IUnknown(Add('Format')) as EXGANTTLib_TLB.Column) do
		begin
			FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' + 
	'0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )';
			Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
		end;
	end;
	with Items do
	begin
		AddItem(OleVariant(10));
		AddItem(OleVariant(-8));
	end;
	EndUpdate();
end
817:
How do I access the cells, or how do I get the values in the columns
with Gantt1 do
begin
	with Columns do
	begin
		Add('C1');
		Add('C2');
		Add('C3');
	end;
	with Items do
	begin
		h := AddItem('Item 1');
		CellCaption[OleVariant(h),OleVariant(1)] := 'SubItem 1.1';
		CellCaption[OleVariant(h),OleVariant(2)] := 'SubItem 1.2';
		OutputDebugString( CellCaption[OleVariant(h),OleVariant(2)] );
	end;
end
816:
How can I change the check-boxes appearance

with Gantt1 do
begin
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Default')) as EXGANTTLib_TLB.Column) do
	begin
		Def[EXGANTTLib_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;
	with VisualAppearance do
	begin
		Add(1,'XP:Button 3 12');
		Add(2,'XP:Button 3 11');
		Add(3,'XP:Button 3 10');
	end;
	CheckImage[EXGANTTLib_TLB.Unchecked] := 16777216;
	CheckImage[EXGANTTLib_TLB.Checked] := 33554432;
	CheckImage[EXGANTTLib_TLB.PartialChecked] := 50331648;
end
815:
How can I load my table from an Access 2007, using ADO

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib_TLB.exDay;
		FirstWeekDay := EXGANTTLib_TLB.exMonday;
		OverviewVisible := EXGANTTLib_TLB.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGantt\Sample\Access2007\sample.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	EndUpdate();
end
814:
Is it possible display numbers in the same format no matter of regional settings in the control panel

with Gantt1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Def')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
	with Items do
	begin
		h := AddItem(OleVariant(666666.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') +  '' <fgcolor=808080>(default positive)''';
		h := AddItem(OleVariant(666666.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''2|.|3|,|1|1'')';
		h := AddItem(OleVariant(-666666.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') +  '' <fgcolor=808080>(default negative)''';
		h := AddItem(OleVariant(-666666.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''2|.|3|,|1|1'')';
	end;
	EndUpdate();
end
813:
The right pane needs to show ONLY the hours 6am to 9pm (every hour) for one day only and the user should not to be able to scroll left or right nor see any other hours. How can I do that

with Gantt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		ScrollRange[EXGANTTLib_TLB.exStartDate] := '1/1/2001';
		ScrollRange[EXGANTTLib_TLB.exEndDate] := '1/1/2001';
		UnitScale := EXGANTTLib_TLB.exHour;
		NonworkingHours := 12582975;
		ShowNonworkingUnits := False;
		Level[0].Alignment := Integer(EXGANTTLib_TLB.exHOutside) Or Integer(EXGANTTLib_TLB.CenterAlignment);
		UnitWidth := 18;
		PaneWidth[True] := 294;
		ScrollBar := False;
	end;
	OnResizeControl := EXGANTTLib_TLB.exDisableSplitter;
	EndUpdate();
end
812:
Can I use ebn files to display the selected dates

with Gantt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(2,'c:\exontrol\images\normal.ebn');
		Add(1,'CP:2 0 -4 0 4');
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $1000000;
		SelectLevel := 1;
		SelectDate['1/3/2008'] := True;
		SelectDate['1/4/2008'] := True;
	end;
	Columns.Add('Default');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2008','1/6/2008',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2008','1/7/2008',Null,Null);
		AddBar(AddItem('Item 3'),'Task','1/4/2008','1/8/2008',Null,Null);
		AddBar(AddItem('Item 4'),'Task','1/5/2008','1/9/2008',Null,Null);
	end;
	EndUpdate();
end
811:
Can I use ebn files to display the selected dates

with Gantt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $1000000;
		SelectLevel := 1;
		SelectDate['1/3/2008'] := True;
	end;
	Columns.Add('Default');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2008','1/6/2008',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2008','1/7/2008',Null,Null);
		AddBar(AddItem('Item 3'),'Task','1/4/2008','1/8/2008',Null,Null);
	end;
	EndUpdate();
end
810:
How can I change the color for selected dates to be solid

with Gantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $7fff0000;
		SelectLevel := 1;
		SelectDate['1/15/2008'] := True;
		SelectDate['1/16/2008'] := True;
	end;
	EndUpdate();
end
809:
How can I add or change the padding (spaces) for captions in the control's header

with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	(IUnknown(Columns.Add('Padding-Left')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exHeaderPaddingLeft] := OleVariant(18);
	with (IUnknown(Columns.Add('Padding-Right')) as EXGANTTLib_TLB.Column) do
	begin
		Def[EXGANTTLib_TLB.exHeaderPaddingRight] := OleVariant(18);
		HeaderAlignment := EXGANTTLib_TLB.RightAlignment;
	end;
	EndUpdate();
end
808:
Do you have any plans to add cell spacing and cell padding to the cells

with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	DrawGridLines := EXGANTTLib_TLB.exAllLines;
	with (IUnknown(Columns.Add('Padding-Left')) as EXGANTTLib_TLB.Column) do
	begin
		Def[EXGANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXGANTTLib_TLB.exCellPaddingLeft] := OleVariant(18);
	end;
	(IUnknown(Columns.Add('No-Padding')) as EXGANTTLib_TLB.Column).Def[EXGANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
	(IUnknown(Columns.Add('Empty')) as EXGANTTLib_TLB.Column).Position := 0;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Item A.1')),OleVariant(1)] := 'Item A.2';
		CellCaption[OleVariant(AddItem('Item B.1')),OleVariant(1)] := 'Item B.2';
		CellCaption[OleVariant(AddItem('Item C.1')),OleVariant(1)] := 'Item C.2';
	end;
	EndUpdate();
end
807:
Is it possible to display information about the firing events
// Event event - Notifies the application once the control fires an event.
procedure TForm1.Gantt1Event(ASender: TObject; EventID : Integer);
begin
	with Gantt1 do
	begin
		OutputDebugString( EventParam[-2] );
	end
end;


806:
Is it possible to scroll the control's content by clicking and moving the mouse up or down

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib_TLB.exDay;
		FirstWeekDay := EXGANTTLib_TLB.exMonday;
		OverviewVisible := EXGANTTLib_TLB.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.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,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	AutoDrag := EXGANTTLib_TLB.exAutoDragScroll;
	EndUpdate();
end
805:
How do I load bars from my ADO table/database

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Gantt1AddItem(ASender: TObject; Item : HITEM);
begin
	with Gantt1 do
	begin
		with Items do
		begin
			AddBar(Item,'Task',CellCaption[OleVariant(Item),OleVariant(2)],CellCaption[OleVariant(Item),OleVariant(4)],Null,Null);
		end;
	end
end;

with Gantt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '8/3/1994';
		PaneWidth[False] := 256;
		LevelCount := 2;
		UnitScale := EXGANTTLib_TLB.exDay;
		FirstWeekDay := EXGANTTLib_TLB.exMonday;
		OverviewVisible := EXGANTTLib_TLB.exOverviewShowAll;
	end;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.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,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	EndUpdate();
end
804:
Is it possible to auto-numbering the children items but still keeps the position after filtering

with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Items')) as EXGANTTLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXGANTTLib_TLB.exFilter;
		Filter := 'Child 2';
	end;
	with (IUnknown(Columns.Add('Pos.1')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '1 ropos ''''';
		Position := 0;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.2')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '1 ropos '':''';
		Position := 1;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.3')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '1 ropos '':|A-Z''';
		Position := 2;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.4')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '1 ropos ''|A-Z|''';
		Position := 3;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.5')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '''<font Tahoma;7>'' + 1 ropos ''-<b>||A-Z''';
		Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
		Position := 4;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.6')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '''<b>''+ 1 ropos ''</b>:<fgcolor=FF0000>|A-Z|''';
		Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
		Position := 5;
		Width := 48;
		AllowSizing := False;
	end;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
	end;
	ApplyFilter();
	EndUpdate();
end
803:
Is it possible to auto-numbering the children items too

with Gantt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	LinesAtRoot := EXGANTTLib_TLB.exLinesAtRoot;
	Columns.Add('Items');
	with (IUnknown(Columns.Add('Pos.1')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '1 rpos ''''';
		Position := 0;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.2')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '1 rpos '':''';
		Position := 1;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.3')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '1 rpos '':|A-Z''';
		Position := 2;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.4')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '1 rpos ''|A-Z|''';
		Position := 3;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.5')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '''<font Tahoma;7>'' + 1 rpos ''-<b>||A-Z''';
		Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
		Position := 4;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.6')) as EXGANTTLib_TLB.Column) do
	begin
		FormatColumn := '''<b>''+ 1 rpos ''</b>:<fgcolor=FF0000>|A-Z|''';
		Def[EXGANTTLib_TLB.exCellCaptionFormat] := OleVariant(1);
		Position := 5;
		Width := 48;
		AllowSizing := False;
	end;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
	end;
	EndUpdate();
end
802:
Is there any way to add auto-numbering

with Gantt1 do
begin
	with Columns do
	begin
		Add('Items');
		with (IUnknown(Add('Pos')) as EXGANTTLib_TLB.Column) do
		begin
			FormatColumn := '1 pos ''''';
			Position := 0;
		end;
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
end
801:
How can I format my column to display the percent values “5,00%”

with Gantt1 do
begin
	(IUnknown(Columns.Add('Percent')) as EXGANTTLib_TLB.Column).FormatColumn := '((dbl(value) * 100) format ''2|,|3.'')+''%''';
	with Items do
	begin
		AddItem(OleVariant(0.5));
		AddItem(OleVariant(0.4));
		AddItem(OleVariant(0.75));
	end;
end