79
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Items.ItemHeight(0) = View.DefaultItemHeight
	// FilterBarFont.Size = Me.Font.Size
	// ToolTipFont.Size = Me.Font.Size
	with CascadeTree1 do
	begin
		with View do
		begin
			DefaultItemHeight := 36;
			HeaderHeight := DefaultItemHeight;
			SortBarHeight := DefaultItemHeight;
			Indent := 26;
			CheckImage[EXCASCADETREELib_TLB.Unchecked] := 16777216;
			CheckImage[EXCASCADETREELib_TLB.Checked] := 33554432;
			CheckImage[EXCASCADETREELib_TLB.PartialChecked] := 50331648;
			EnsureVisibleColumn('Function');
			with Columns.Item['Function'] do
			begin
			end;
			Columns.Item[OleVariant(0)].Def[EXCASCADETREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	ImageSize := 32;
	Font.Size := 16;
	Images('gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqN' + 
	'UqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlwy' + 
	'V21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+CM' + 
	'Po9MBMC+j2vC8j7wS8cFNI4k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XCASCADETREELib_TLB.BackgroundPartEnum($14)] := SelBackColor;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($15)] := SelForeColor;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($8 Or Integer(EXCASCADETREELib_TLB.exSplitBar))] := BackColor;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($9 Or Integer(EXCASCADETREELib_TLB.exSplitBar))] := ForeColor;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($20)] := $ffffffff;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($0)] := $4000000;
	Background[EXCASCADETREELib_TLB.exHeaderFilterBarActive] := $4010101;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($1)] := $40000ff;
	HeaderAppearance := EXCASCADETREELib_TLB.Etched;
	BackColorSortBar := BackColor;
	BackColorLevelHeader := BackColor;
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\MN';
	EndUpdate();
end
78
ImageSize property on 16 (default) (specifies the size of control' icons/images/check-boxes/radio-buttons)

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			EnsureVisibleColumn('Function');
			with Columns.Item['Function'] do
			begin
			end;
			Columns.Item[OleVariant(0)].Def[EXCASCADETREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	ImageSize := 16;
	Images('gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOqd' + 
	'SqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVtt' + 
	'mp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8ac' + 
	'vQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtTG' + 
	'sbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgPn' + 
	'wD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg==');
	with VisualAppearance do
	begin
		Add(4,'gBFLBCJwBAEHhEJAAEhABUYCg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSO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elBackColor := $4000000;
	SelForeColor := RGB(0,0,1);
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($14)] := SelBackColor;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($15)] := SelForeColor;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($8 Or Integer(EXCASCADETREELib_TLB.exSplitBar))] := BackColor;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($9 Or Integer(EXCASCADETREELib_TLB.exSplitBar))] := ForeColor;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($20)] := $ffffffff;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($0)] := $4000000;
	Background[EXCASCADETREELib_TLB.exHeaderFilterBarActive] := $4010101;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($1)] := $40000ff;
	HeaderAppearance := EXCASCADETREELib_TLB.Etched;
	BackColorSortBar := BackColor;
	BackColorLevelHeader := BackColor;
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\MN';
	EndUpdate();
end
77
Is it possible to highlight the column's header once a filter is applied

with CascadeTree1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(2,'gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgANJ' + 
	'0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8YN' + 
	'YuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4h' + 
	'hKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mgb' + 
	'hOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhWB' + 
	'MJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=');
		Add(1,'CP:2 -8 -4 2 4');
	end;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($0)] := $1fefefe;
	Background[EXCASCADETREELib_TLB.exHeaderFilterBarActive] := $1010101;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($20)] := $ffffffff;
	BackColorHeader := RGB(255,255,255);
	Mode := EXCASCADETREELib_TLB.exSingleCascadeMode;
	with DefaultView[Null] do
	begin
		HeaderHeight := 28;
		DrawGridLines := EXCASCADETREELib_TLB.exRowLines;
		HeaderVisible := True;
		with Columns do
		begin
			(IUnknown(Add('C1')) as EXCASCADETREELib_TLB.Column).DisplayFilterButton := True;
			with (IUnknown(Add('C2')) as EXCASCADETREELib_TLB.Column) do
			begin
				DisplayFilterButton := True;
				Filter := 'Item 2';
				FilterType := EXCASCADETREELib_TLB.exFilter;
			end;
			(IUnknown(Add('C3')) as EXCASCADETREELib_TLB.Column).DisplayFilterButton := True;
		end;
		with Items do
		begin
			h := AddItem('Item 1');
			CellValue[OleVariant(h),OleVariant(1)] := 'Item 2';
			CellValue[OleVariant(h),OleVariant(2)] := 'Item 3';
			h := AddItem('Item 4');
			CellValue[OleVariant(h),OleVariant(1)] := 'Item 5';
			CellValue[OleVariant(h),OleVariant(2)] := 'Item 6';
		end;
		ApplyFilter();
	end;
	EndUpdate();
end
76
Is it possible to show the filterbar on top of the rows

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSingleCascadeMode;
	with DefaultView[Null] do
	begin
		ColumnAutoResize := True;
		FilterBarPromptVisible := EXCASCADETREELib_TLB.exFilterBarTop;
		HeaderHeight := 24;
		FilterBarHeight := HeaderHeight;
		HeaderAppearance := EXCASCADETREELib_TLB.Flat;
		DrawGridLines := EXCASCADETREELib_TLB.exAllLines;
		GridLineStyle := EXCASCADETREELib_TLB.exGridLinesGeometric;
		with (IUnknown(Columns.Add('Column')) as EXCASCADETREELib_TLB.Column) do
		begin
			DisplayFilterButton := True;
			FilterType := EXCASCADETREELib_TLB.exPattern;
			Filter := 'B*';
		end;
		with (IUnknown(Columns.Add('Index')) as EXCASCADETREELib_TLB.Column) do
		begin
			FormatColumn := '1 index ``';
			Position := 0;
			Width := 48;
			AllowSizing := False;
			SortType := EXCASCADETREELib_TLB.SortNumeric;
			Def[EXCASCADETREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		end;
		with Items do
		begin
			AddItem('A.1');
			AddItem('A.2');
			AddItem('B.1');
			AddItem('B.2');
			AddItem('B.3');
			AddItem('C');
		end;
		ApplyFilter();
	end;
	EndUpdate();
end
75
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header (non-clickable)

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			k := ParentView.Value[Null];
			BeginUpdate();
			ColumnAutoResize := True;
			Columns.Add(k);
			with Items do
			begin
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 1`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 2`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 3`',OleVariant(k),Null,Null));
			end;
			EndUpdate();
		end;
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	with View do
	begin
		BeginUpdate();
		ColumnAutoResize := True;
		with (IUnknown(Columns.Add('Default')) as EXCASCADETREELib_TLB.Column) do
		begin
			AllowSort := False;
			AllowDragging := False;
		end;
		Key := OleVariant(0);
		with Items do
		begin
			AddItem('Item A');
			SelectItem[AddItem('Item B')] := True;
			AddItem('Item C');
		end;
		EndUpdate();
	end;
	EndUpdate();
end
74
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			k := ParentView.Value[Null];
			BeginUpdate();
			ColumnAutoResize := True;
			Columns.Add(k);
			with Items do
			begin
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 1`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 2`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 3`',OleVariant(k),Null,Null));
			end;
			EndUpdate();
		end;
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($20)] := $ffffffff;
	with View do
	begin
		BeginUpdate();
		ColumnAutoResize := True;
		Columns.Add('Default');
		Key := OleVariant(0);
		with Items do
		begin
			AddItem('Item A');
			SelectItem[AddItem('Item B')] := True;
			AddItem('Item C');
		end;
		EndUpdate();
	end;
	EndUpdate();
end
73
Type of wraps the cell's caption support (Sample 2)

with CascadeTree1 do
begin
	Mode := EXCASCADETREELib_TLB.exSingleCascadeMode;
	with DefaultView[Null] do
	begin
		BeginUpdate();
		HeaderSingleLine := False;
		HeaderHeight := 36;
		DrawGridLines := EXCASCADETREELib_TLB.exRowLines;
		ColumnAutoResize := False;
		ScrollBySingleLine := True;
		with Columns do
		begin
			with (IUnknown(Add('Single-Line (exCaptionSingleLine)')) as EXCASCADETREELib_TLB.Column) do
			begin
				Width := 96;
				Def[EXCASCADETREELib_TLB.exCellValueFormat] := OleVariant(1);
				Def[EXCASCADETREELib_TLB.exCellSingleLine] := OleVariant(-1);
			end;
			with (IUnknown(Add('Word-Wrap (exCaptionWordWrap)')) as EXCASCADETREELib_TLB.Column) do
			begin
				Width := 96;
				Def[EXCASCADETREELib_TLB.exCellValueFormat] := OleVariant(1);
				Def[EXCASCADETREELib_TLB.exCellSingleLine] := OleVariant(0);
				FormatColumn := '%0';
			end;
			with (IUnknown(Add('Break-Wrap (exCaptionBreakWrap)')) as EXCASCADETREELib_TLB.Column) do
			begin
				Width := 96;
				Def[EXCASCADETREELib_TLB.exCellValueFormat] := OleVariant(1);
				Def[EXCASCADETREELib_TLB.exCellSingleLine] := OleVariant(1);
				FormatColumn := '%0';
			end;
		end;
		with Items do
		begin
			AddItem('This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.');
			AddItem('This is the <b>first</b> line.\r\nThis is the <b>second</b> line.\r\nThis is the <b>third</b> line.');
		end;
		EndUpdate();
	end;
end
72
Type of wraps the cell's caption support (Sample 1)

with CascadeTree1 do
begin
	Mode := EXCASCADETREELib_TLB.exSingleCascadeMode;
	with DefaultView[Null] do
	begin
		BeginUpdate();
		HeaderSingleLine := False;
		HeaderHeight := 36;
		DrawGridLines := EXCASCADETREELib_TLB.exRowLines;
		ColumnAutoResize := False;
		ScrollBySingleLine := True;
		(IUnknown(Columns.Add('Default')) as EXCASCADETREELib_TLB.Column).Width := 128;
		with Items do
		begin
			h := AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.');
			h := AddItem('This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.');
			CellValueFormat[OleVariant(h),OleVariant(0)] := EXCASCADETREELib_TLB.exHTML;
			h := AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.');
			CellSingleLine[OleVariant(h),OleVariant(0)] := EXCASCADETREELib_TLB.exCaptionWordWrap;
			h := AddItem('This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.');
			CellValueFormat[OleVariant(h),OleVariant(0)] := EXCASCADETREELib_TLB.exHTML;
			CellSingleLine[OleVariant(h),OleVariant(0)] := EXCASCADETREELib_TLB.exCaptionWordWrap;
			h := AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.');
			CellSingleLine[OleVariant(h),OleVariant(0)] := EXCASCADETREELib_TLB.exCaptionBreakWrap;
			h := AddItem('This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.');
			CellValueFormat[OleVariant(h),OleVariant(0)] := EXCASCADETREELib_TLB.exHTML;
			CellSingleLine[OleVariant(h),OleVariant(0)] := EXCASCADETREELib_TLB.exCaptionBreakWrap;
		end;
		EndUpdate();
	end;
end
71
Can I break the cell's caption using the line break <br> or \r\n (Sample 2)

with CascadeTree1 do
begin
	Mode := EXCASCADETREELib_TLB.exSingleCascadeMode;
	with DefaultView[Null] do
	begin
		BeginUpdate();
		DrawGridLines := EXCASCADETREELib_TLB.exRowLines;
		ColumnAutoResize := False;
		ScrollBySingleLine := True;
		(IUnknown(Columns.Add('Default')) as EXCASCADETREELib_TLB.Column).Width := 128;
		with Items do
		begin
			CellSingleLine[OleVariant(AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.')),OleVariant(0)] := EXCASCADETREELib_TLB.exCaptionBreakWrap;
			AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.');
		end;
		EndUpdate();
	end;
end
70
Can I break the cell's caption using the line break <br> or \r\n (Sample 1)

with CascadeTree1 do
begin
	Mode := EXCASCADETREELib_TLB.exSingleCascadeMode;
	with DefaultView[Null] do
	begin
		BeginUpdate();
		DrawGridLines := EXCASCADETREELib_TLB.exRowLines;
		ColumnAutoResize := False;
		ScrollBySingleLine := True;
		with (IUnknown(Columns.Add('Default')) as EXCASCADETREELib_TLB.Column) do
		begin
			Width := 128;
			Def[EXCASCADETREELib_TLB.exCellSingleLine] := OleVariant(1);
		end;
		with Items do
		begin
			AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.');
			AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.');
		end;
		EndUpdate();
	end;
end
69
Is it possible to change the visual appearance of the position signs when user changes the column's position by drag and drop

with CascadeTree1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADKMA4SOKIZhrE4bBhGaQRUgyI43RhHUBzVI' + 
	'UcQvE6TZRHCQYHgkNIhDJIM7TPLkeSVJaTIRoKhJUogApQThTMgVRDEThkGoSa6soSoYTDBKybLrSLKagOT5YUDKUqSdKEZRpEq1YztWbaQoCUoqVRRVIWfbNd4JJa4a' + 
	'DhWpYdpeeY5R7bWLgBYVVABL7LLRsSxpHxPF6RXxaeI3GKsaS8G6ic6nPQMHj7I4NS5pUa6Rh2VYNSa8AAtETRYznOw4bTMXAjNIea5bAYIIR5HIoDzVbQcCQAHL9DBe' + 
	'EMIQEEISgGhMGZQmocgymoYRRCIEQ0G2HYBnEIBig4V4zCQGINnmagCECY43medZ6H2Pw/g+X5fnueh/h+R5+AKABfkMWgGgGYA4AICoCGCE5WA4CphACMgSD2IRIDIB' + 
	'ICmEd5YGCBpRjGBgegWIYIgWdgoGIRQsiKCZiAiJZ0gGQI4jUS4LECOAiBmDJflGfg2BSY4Al4OhGkOCJ2DgFJjGGfgqgiH5Ch4RhGkqOQmEOEpkFkHQYhJRYyESAokG' + 
	'KHhIhKIxJEmf4VGUeRGFmF5iBkchPhYJQ5GoYIZg6Ug6GoFYmkmNhuhulRGHKGoImefh0BUZ4JmYeoemeSZ2H6HQmgoBgXDqXwUAQgI=');
		Add(2,'CP:1 0 -36 0 0');
	end;
	Background[EXCASCADETREELib_TLB.exColumnsPositionSign] := $2000000;
	Mode := EXCASCADETREELib_TLB.exSingleCascadeMode;
	with DefaultView[Null] do
	begin
		BeginUpdate();
		HeaderAppearance := EXCASCADETREELib_TLB.Etched;
		with Columns do
		begin
			Add('Column 1');
			Add('Column 2');
			Add('Column 3');
		end;
		EndUpdate();
	end;
	EndUpdate();
end
68
DataSource (control, ADODB, ACCDB, x64)

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		bSingle := FormatABC('value > 0 ?  0 : -1',View.Index,Null,Null);
		bColumnAutoResize := FormatABC('value = `City` ?  0 : -1',View.Tag,Null,Null);
		with View do
		begin
			ColumnAutoResize := False;
			SingleSel := False;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := Integer(EXCASCADETREELib_TLB.exAutoFitOnResizeClient) Or Integer(EXCASCADETREELib_TLB.exSplitFixCascadeMode);
	DataSource := 'locktype=1;Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryC' + 
	'ode;Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Nam' + 
	'e=StateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Membe' + 
	'r=Select * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Nam' + 
	'e=Name';
	Select := 'US\AK';
	EndUpdate();
end
67
DataSource (view, ADODB, ACCDB, x64)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could be string (Source/Member), ADO or DAO objects';
	DefColumnWidth := 336;
	ado := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset'))) as ADODB_TLB.Recordset);
	with ado do
	begin
		Open('Countries','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb',3,1,-1);
	end;
	with DefaultView[Null] do
	begin
		DataSource := (IUnknown(ado) as ADODB_TLB.Recordset);
		ColumnAutoResize := True;
	end;
	EndUpdate();
end
66
Simple sample

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		bSingle := FormatABC('value > 0 ?  0 : -1',View.Index,Null,Null);
		bColumnAutoResize := FormatABC('value = `City` ?  0 : -1',View.Tag,Null,Null);
		with View do
		begin
			ColumnAutoResize := False;
			SingleSel := False;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := Integer(EXCASCADETREELib_TLB.exAutoFitOnResizeClient) Or Integer(EXCASCADETREELib_TLB.exSplitFixCascadeMode);
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	EndUpdate();
end
65
FilterBar sample

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			HeaderHeight := 20;
			HeaderAppearance := EXCASCADETREELib_TLB.Etched;
			DrawGridLines := EXCASCADETREELib_TLB.exAllLines;
			GridLineStyle := EXCASCADETREELib_TLB.exGridLinesDash;
		end;
		with DefaultView[Null] do
		begin
			with View['Country'] do
			begin
				BeginUpdate();
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				with Columns.Item[OleVariant(1)] do
				begin
					HTMLCaption := 'Country';
					DisplayFilterButton := True;
					FilterList := Integer(EXCASCADETREELib_TLB.exShowExclude) Or Integer(EXCASCADETREELib_TLB.exShowFocusItem) Or Integer(EXCASCADETREELib_TLB.exShowCheckBox) Or Integer(EXCASCADETREELib_TLB.exSortItemsAsc);
					FilterBarDropDownWidth := 2;
				end;
				EndUpdate();
			end;
			with View['State'] do
			begin
				BeginUpdate();
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				with Columns.Item[OleVariant(2)] do
				begin
					HTMLCaption := 'State';
					DisplayFilterButton := True;
					FilterList := Integer(EXCASCADETREELib_TLB.exShowExclude) Or Integer(EXCASCADETREELib_TLB.exShowFocusItem) Or Integer(EXCASCADETREELib_TLB.exShowCheckBox) Or Integer(EXCASCADETREELib_TLB.exSortItemsAsc);
					FilterBarDropDownWidth := 2;
				end;
				EndUpdate();
			end;
			with View['City'] do
			begin
				BeginUpdate();
				Columns.Item['CountryCode'].Visible := False;
				Columns.Item['StateCode'].Visible := False;
				with Columns.Item['Name'] do
				begin
					HTMLCaption := 'City';
					Width := 128;
					DisplayFilterButton := True;
					FilterList := Integer(EXCASCADETREELib_TLB.exShowExclude) Or Integer(EXCASCADETREELib_TLB.exShowFocusItem) Or Integer(EXCASCADETREELib_TLB.exShowCheckBox) Or Integer(EXCASCADETREELib_TLB.exSortItemsAsc);
					FilterBarDropDownWidth := 2;
				end;
				SearchColumnIndex := Columns.Item['Name'].Index;
				with Columns.Item['Status'] do
				begin
					DisplayFilterButton := True;
					FilterList := Integer(EXCASCADETREELib_TLB.exShowExclude) Or Integer(EXCASCADETREELib_TLB.exShowFocusItem) Or Integer(EXCASCADETREELib_TLB.exShowCheckBox) Or Integer(EXCASCADETREELib_TLB.exSortItemsAsc);
					FilterBarDropDownWidth := 2;
				end;
				with Columns.Item['Function'] do
				begin
					Def[EXCASCADETREELib_TLB.exCellValueFormat] := OleVariant(1);
					FormatColumn := 'value replace 1 with `<img>1</img>` replace 2 with `<img>2</img>` replace 3 with `<img>3</img>` replace 4 with `<img>4</img>` re' + 
		'place 5 with `<img>5</img>` replace 6 with `<img>6</img>` replace 7 with `<img>7</img>` replace 8 with `<img>8</img>` replace 9 ' + 
		'with `<img>9</img>` replace `-` with `` ';
				end;
				with (IUnknown(Columns.Add('Pos')) as EXCASCADETREELib_TLB.Column) do
				begin
					AllowSizing := False;
					Width := 32;
					Def[EXCASCADETREELib_TLB.exCellBackColor] := OleVariant(15790320);
					Position := 0;
					FormatColumn := '1 pos ``';
					Alignment := EXCASCADETREELib_TLB.CenterAlignment;
					HeaderAlignment := Alignment;
				end;
				CountLockedColumns := 1;
				Width := WidthToFit;
				EndUpdate();
			end;
		end;
		with View do
		begin
			FilterBarHeight := 36;
			FilterBarCaption := '(( ( allui replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `' + 
		'[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` )  + `<r><fgcolor=808080>` + ( match' + 
		'itemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcoun' + 
		't + ` item(s)`) )))';
			FilterBarPromptVisible := Integer(EXCASCADETREELib_TLB.exFilterBarShowCloseIfRequired) Or Integer(EXCASCADETREELib_TLB.exFilterBarVisible) Or Integer(EXCASCADETREELib_TLB.exFilterBarPromptVisible);
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Images('C:\Program Files\Exontrol\ExCascadeTree\Sample\Bullets\Bullet-01.ico');
	Images('C:\Program Files\Exontrol\ExCascadeTree\Sample\Bullets\Bullet-02.ico');
	Images('C:\Program Files\Exontrol\ExCascadeTree\Sample\Bullets\Bullet-03.ico');
	Images('C:\Program Files\Exontrol\ExCascadeTree\Sample\Bullets\Bullet-04.ico');
	Images('C:\Program Files\Exontrol\ExCascadeTree\Sample\Bullets\Bullet-05.ico');
	Images('C:\Program Files\Exontrol\ExCascadeTree\Sample\Bullets\Bullet-06.ico');
	Images('C:\Program Files\Exontrol\ExCascadeTree\Sample\Bullets\Bullet-07.ico');
	Images('C:\Program Files\Exontrol\ExCascadeTree\Sample\Bullets\Bullet-08.ico');
	Images('C:\Program Files\Exontrol\ExCascadeTree\Sample\Bullets\Bullet-09.ico');
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.mdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Count' + 
	'ry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName;T' + 
	'ag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * FR' + 
	'OM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'RO\CJ';
	with DefaultView[Null].View['City'] do
	begin
		FilterBarPromptPattern := 'Tu';
	end;
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADKMA4SOKIZhrE4bBhGaQRUgyI43RhHUBzVI' + 
	'UcQvE6TZRHCQYHgkNIhDJIM7TPLkeSVJaTIRoKhJUogApQThTMgVRDEThkGoSa6soSoYTDBKybLrSLKagOT5YUDKUqSdKEZRpEq1YztWbaQoCUoqVRRVIWfbNd4JJa4a' + 
	'DhWpYdpeeY5R7bWLgBYVVABL7LLRsSxpHxPF6RXxaeI3GKsaS8G6ic6nPQMHj7I4NS5pUa6Rh2VYNSa8AAtETRYznOw4bTMXAjNIea5bAYIIR5HIoDzVbQcCQAHL9DBe' + 
	'EMIQEEISgGhMGZQmocgymoYRRCIEQ0G2HYBnEIBig4V4zCQGINnmagCECY43medZ6H2Pw/g+X5fnueh/h+R5+AKABfkMWgGgGYA4AICoCGCE5WA4CphACMgSD2IRIDIB' + 
	'ICmEd5YGCBpRjGBgegWIYIgWdgoGIRQsiKCZiAiJZ0gGQI4jUS4LECOAiBmDJflGfg2BSY4Al4OhGkOCJ2DgFJjGGfgqgiH5Ch4RhGkqOQmEOEpkFkHQYhJRYyESAokG' + 
	'KHhIhKIxJEmf4VGUeRGFmF5iBkchPhYJQ5GoYIZg6Ug6GoFYmkmNhuhulRGHKGoImefh0BUZ4JmYeoemeSZ2H6HQmgoBgXDqXwUAQgI=');
		Add(2,'gBFLBCJwBA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' + 
	'jIeIPBMBJBD+TBjBifwvkuc58hQJQPmFrYykkchclSApKjGOBuD+TRDFCfw3mmIxNi8FxFlOXhVC4aYDFyPgvg2YBcBcLZGCGCJ0DSLRzGSWQ/lmY5+mEP5gmMDBZRSM' + 
	'RsFsOxMhMJJ/DsTpTnwaQaE+N5ojuNhdEYNI5C4TZJO1GRDmCaxnA2Yx4n8IpIjOTBQBQC5TgyYw7gUYRYikC0BYRwsDQBoB8eA6Q2hsE0BUXgywZtYCyHMKwnxSAhAQ' + 
	'HkIQhRrBaDsCwA4ERiB2EWAIYIXhhiVEgAEUYwwYjyASLge4FhHgRDkM8OQih0jWPkGgBBAQ');
	end;
	BackColorSortBar := BackColor;
	ScrollPartVisible[EXCASCADETREELib_TLB.exVScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exHScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXCASCADETREELib_TLB.exVSBack] := $f0f0f0;
	Background[EXCASCADETREELib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXCASCADETREELib_TLB.exHSBack] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exHSThumb] := Background[EXCASCADETREELib_TLB.exVSThumb];
	Background[EXCASCADETREELib_TLB.exScrollSizeGrip] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exCSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exHSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $4;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($0)] := $1000000;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($1)] := $2000000;
	Background[EXCASCADETREELib_TLB.BackgroundPartEnum($20)] := $ffffffff;
	EndUpdate();
end
64
GroupBy sample

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		View.HeaderHeight := 24;
		with DefaultView[Null] do
		begin
			with View['State'] do
			begin
				BeginUpdate();
				SingleSel := False;
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				with Columns.Item[OleVariant(2)] do
				begin
					HTMLCaption := 'State <off 4><fgcolor=808080>Name';
					SortOrder := EXCASCADETREELib_TLB.SortAscending;
				end;
				EndUpdate();
			end;
			with View['City'] do
			begin
				nSelected := ParentView.Items.SelectCount;
				bGroupBy := CascadeTree1.FormatABC('value > 1 ? -1 : 0',OleVariant(nSelected),Null,Null);
				BeginUpdate();
				SingleSel := False;
				SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
				HasLines := EXCASCADETREELib_TLB.exSolidLine;
				ColumnAutoResize := False;
				DrawGridLines := EXCASCADETREELib_TLB.exVLines;
				GridLineStyle := EXCASCADETREELib_TLB.exGridLinesVSolid;
				Columns.Item['CountryCode'].Visible := False;
				with Columns.Item['Name'] do
				begin
					HTMLCaption := 'City <off 4><fgcolor=808080>Name';
					Width := 128;
					SortOrder := EXCASCADETREELib_TLB.SortAscending;
				end;
				SearchColumnIndex := 2;
				TreeColumnIndex := SearchColumnIndex;
				SingleSort := False;
				AllowGroupBy := False;
				SortBarVisible := False;
				with Columns.Item['StateCode'] do
				begin
					Visible := False;
					SortOrder := EXCASCADETREELib_TLB.SortAscending;
				end;
				Width := WidthToFit;
				EndUpdate();
			end;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'C:\Program Files\Exontrol\ExCascadeTree\Sample\EBN\Assorted\vistaselDark.ebn');
		Add(2,'C:\Program Files\Exontrol\ExCascadeTree\Sample\EBN\Assorted\bhframe.ebn');
	end;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.mdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Count' + 
	'ry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName;T' + 
	'ag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * FR' + 
	'OM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'RO\CJ|BV|GL|IL';
	with DefaultView[Null].View['Country'] do
	begin
		BeginUpdate();
		ColumnAutoResize := True;
		Columns.Item[OleVariant(0)].Visible := False;
		with Columns.Item[OleVariant(1)] do
		begin
			HTMLCaption := 'Country <off 4><fgcolor=808080>Name';
			SortOrder := EXCASCADETREELib_TLB.SortAscending;
		end;
		EndUpdate();
	end;
	SelBackColor := $1000000;
	SelForeColor := RGB(255,255,255);
	BackColorHeader := $2000000;
	BackColorSortBar := BackColor;
	BackColorSortBarCaption := BackColor;
	ScrollPartVisible[EXCASCADETREELib_TLB.exVScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exHScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXCASCADETREELib_TLB.exVSBack] := $f0f0f0;
	Background[EXCASCADETREELib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXCASCADETREELib_TLB.exHSBack] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exHSThumb] := Background[EXCASCADETREELib_TLB.exVSThumb];
	Background[EXCASCADETREELib_TLB.exScrollSizeGrip] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exCSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exHSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $4;
	BackColorSortBar := BackColor;
	EndUpdate();
end
63
Manual sample

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; V : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			BeginUpdate();
			k := ParentView.Value[Null];
			HeaderVisible := False;
			ColumnAutoResize := True;
			ScrollBySingleLine := True;
			(IUnknown(Columns.Add('Default')) as EXCASCADETREELib_TLB.Column).Def[EXCASCADETREELib_TLB.exCellSingleLine] := OleVariant(False);
			Key := OleVariant(0);
			with Items do
			begin
				AddItem(CascadeTree1.FormatABC('A + `.Child 1`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `.Child 2`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `.Child 3`',OleVariant(k),Null,Null));
			end;
			EndUpdate();
		end;
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	BackColorAlternate := $7ff0f0f0;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $f0f0f0;
	with DefaultView[Null] do
	begin
		BeginUpdate();
		HeaderVisible := False;
		ColumnAutoResize := True;
		ScrollBySingleLine := True;
		(IUnknown(Columns.Add('Default')) as EXCASCADETREELib_TLB.Column).Def[EXCASCADETREELib_TLB.exCellSingleLine] := OleVariant(False);
		Key := OleVariant(0);
		with Items do
		begin
			AddItem('Item A');
			AddItem('Item B');
			AddItem('Item C');
		end;
		EndUpdate();
	end;
	Select := 'Item A\Item*A*2\Item*A*2*3\';
	EndUpdate();
end
62
Appearance sample

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		View.HeaderHeight := 24;
		with DefaultView[Null] do
		begin
			with View['State'] do
			begin
				BeginUpdate();
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				with Columns.Item[OleVariant(2)] do
				begin
					HTMLCaption := 'State <off 4><fgcolor=808080>Name';
					SortOrder := EXCASCADETREELib_TLB.SortAscending;
				end;
				with Items do
				begin
					LockedItemCount[EXCASCADETREELib_TLB.exTop] := 1;
					h := LockedItem[EXCASCADETREELib_TLB.exTop,0];
					ItemDivider[h] := 0;
					CellValueFormat[OleVariant(h),OleVariant(0)] := Integer(EXCASCADETREELib_TLB.exTotalField) Or Integer(EXCASCADETREELib_TLB.exHTML);
					CellValue[OleVariant(h),OleVariant(0)] := 'count(all,all,1)';
					FormatCell[OleVariant(h),OleVariant(0)] := '`<r>States: <b>`+ (value format `0`)';
				end;
				EndUpdate();
			end;
			with View['City'] do
			begin
				BeginUpdate();
				SingleSel := False;
				ColumnAutoResize := False;
				DrawGridLines := EXCASCADETREELib_TLB.exVLines;
				GridLineStyle := EXCASCADETREELib_TLB.exGridLinesVSolid;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				with Columns.Item[OleVariant(2)] do
				begin
					HTMLCaption := 'City <off 4><fgcolor=808080>Name';
					Width := 128;
					Def[EXCASCADETREELib_TLB.exCellHasCheckBox] := OleVariant(True);
					SortOrder := EXCASCADETREELib_TLB.SortAscending;
				end;
				SearchColumnIndex := 2;
				ConditionalFormats.Add('%CS2 = 1',Null).Bold := True;
				with Items do
				begin
					LockedItemCount[EXCASCADETREELib_TLB.exTop] := 1;
					h := LockedItem[EXCASCADETREELib_TLB.exTop,0];
					ItemDivider[h] := 0;
					CellValueFormat[OleVariant(h),OleVariant(0)] := Integer(EXCASCADETREELib_TLB.exTotalField) Or Integer(EXCASCADETREELib_TLB.exHTML);
					CellValue[OleVariant(h),OleVariant(0)] := 'count(all,all,1)';
					FormatCell[OleVariant(h),OleVariant(0)] := '`<r>Cities: <b>`+ (value format `0`)';
				end;
				Width := WidthToFit;
				EndUpdate();
			end;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'C:\Program Files\Exontrol\ExCascadeTree\Sample\EBN\MSOffice-Ribbon\msor_select.ebn');
		Add(2,'C:\Program Files\Exontrol\ExCascadeTree\Sample\EBN\MSOffice-Ribbon\msor_background.ebn');
	end;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.mdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Count' + 
	'ry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName;T' + 
	'ag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * FR' + 
	'OM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	with DefaultView[Null].View['Country'] do
	begin
		BeginUpdate();
		ColumnAutoResize := True;
		Columns.Item[OleVariant(0)].Visible := False;
		with Columns.Item[OleVariant(1)] do
		begin
			HTMLCaption := 'Country <off 4><fgcolor=808080>Name';
			SortOrder := EXCASCADETREELib_TLB.SortAscending;
		end;
		with Items do
		begin
			LockedItemCount[EXCASCADETREELib_TLB.exTop] := 1;
			h := LockedItem[EXCASCADETREELib_TLB.exTop,0];
			ItemDivider[h] := 0;
			CellValueFormat[OleVariant(h),OleVariant(0)] := Integer(EXCASCADETREELib_TLB.exTotalField) Or Integer(EXCASCADETREELib_TLB.exHTML);
			CellValue[OleVariant(h),OleVariant(0)] := 'count(all,all,1)';
			FormatCell[OleVariant(h),OleVariant(0)] := '`<r>Countries: <b>`+ (value format `0`)';
		end;
		EndUpdate();
	end;
	SelBackColor := $1000000;
	SelForeColor := RGB(0,0,0);
	BackColorHeader := $2000000;
	ScrollPartVisible[EXCASCADETREELib_TLB.exVScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exHScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXCASCADETREELib_TLB.exVSBack] := $f0f0f0;
	Background[EXCASCADETREELib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXCASCADETREELib_TLB.exHSBack] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exHSThumb] := Background[EXCASCADETREELib_TLB.exVSThumb];
	Background[EXCASCADETREELib_TLB.exScrollSizeGrip] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exCSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exHSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $4;
	BackColorSortBar := BackColor;
	EndUpdate();
end
61
How can I get the selected items (sample 2)
// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			k := ParentView.Value[Null];
			BeginUpdate();
			ColumnAutoResize := True;
			Key := OleVariant(-1);
			Columns.Add(k);
			with Items do
			begin
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 1`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 2`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 3`',OleVariant(k),Null,Null));
			end;
			EndUpdate();
		end;
	end
end;

// ViewItemStateEndChanging event - Indicates that the state of the item has been changed.
procedure TForm1.CascadeTree1ViewItemStateEndChanging(ASender: TObject; Operation : ViewItemStateEnum;Item : HITEM;ColIndex : Integer);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'End' );
		OutputDebugString( Operation );
		with View.Items do
		begin
			OutputDebugString( 'FocusItem' );
			OutputDebugString( CellCaption[OleVariant(FocusItem),OleVariant(0)] );
			OutputDebugString( 'SelectedItem' );
			OutputDebugString( CellCaption[OleVariant(SelectedItem[0]),OleVariant(0)] );
		end;
	end
end;

// ViewItemStateStartChanging event - Indicates that the state of the item is about to be changed.
procedure TForm1.CascadeTree1ViewItemStateStartChanging(ASender: TObject; Operation : ViewItemStateEnum;Item : HITEM;ColIndex : Integer;var Cancel : OleVariant);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Start' );
		OutputDebugString( Operation );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	with View do
	begin
		BeginUpdate();
		ColumnAutoResize := True;
		Columns.Add('Default');
		Key := OleVariant(0);
		LinesAtRoot := EXCASCADETREELib_TLB.exLinesAtRoot;
		with Items do
		begin
			AddItem('Item A');
			SelectItem[AddItem('Item B')] := True;
			AddItem('Item C');
		end;
		EndUpdate();
	end;
	EndUpdate();
end
60
How do I specify a foreground color for a particular view

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	DefaultView[Null].ConditionalFormats.Add('1',Null).ForeColor := $808080;
	EndUpdate();
end
59
How do display result/items in the view's filter bar

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			HeaderAppearance := EXCASCADETREELib_TLB.Etched;
			HeaderHeight := 24;
			DrawGridLines := EXCASCADETREELib_TLB.exAllLines;
			GridLineStyle := EXCASCADETREELib_TLB.exGridLinesDash;
		end;
		with DefaultView[Null] do
		begin
			with View['Country'] do
			begin
				BeginUpdate();
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				with Columns.Item[OleVariant(1)] do
				begin
					HTMLCaption := 'Country <off 4><fgcolor=808080>Name';
					DisplayFilterButton := True;
					FilterList := Integer(EXCASCADETREELib_TLB.exShowExclude) Or Integer(EXCASCADETREELib_TLB.exShowFocusItem) Or Integer(EXCASCADETREELib_TLB.exShowCheckBox) Or Integer(EXCASCADETREELib_TLB.exSortItemsAsc);
					FilterBarDropDownWidth := 2;
				end;
				EndUpdate();
			end;
			with View['State'] do
			begin
				BeginUpdate();
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				with Columns.Item[OleVariant(2)] do
				begin
					HTMLCaption := 'State <off 4><fgcolor=808080>Name';
					DisplayFilterButton := True;
					FilterList := Integer(EXCASCADETREELib_TLB.exShowExclude) Or Integer(EXCASCADETREELib_TLB.exShowFocusItem) Or Integer(EXCASCADETREELib_TLB.exShowCheckBox) Or Integer(EXCASCADETREELib_TLB.exSortItemsAsc);
					FilterBarDropDownWidth := 2;
				end;
				EndUpdate();
			end;
			with View['City'] do
			begin
				BeginUpdate();
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				with Columns.Item[OleVariant(2)] do
				begin
					HTMLCaption := 'City <off 4><fgcolor=808080>Name';
					Width := 128;
					Def[EXCASCADETREELib_TLB.exCellHasCheckBox] := OleVariant(True);
					DisplayFilterButton := True;
					FilterList := Integer(EXCASCADETREELib_TLB.exShowExclude) Or Integer(EXCASCADETREELib_TLB.exShowFocusItem) Or Integer(EXCASCADETREELib_TLB.exShowCheckBox) Or Integer(EXCASCADETREELib_TLB.exSortItemsAsc);
					FilterBarDropDownWidth := 2;
				end;
				with (IUnknown(Columns.Add('Pos')) as EXCASCADETREELib_TLB.Column) do
				begin
					AllowSizing := False;
					Width := 32;
					Def[EXCASCADETREELib_TLB.exCellBackColor] := OleVariant(15790320);
					Position := 0;
					FormatColumn := '1 pos ``';
				end;
				CountLockedColumns := 1;
				EndUpdate();
			end;
		end;
		with View do
		begin
			FilterBarHeight := 36;
			FilterBarCaption := '(( ( allui replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `' + 
		'[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` )  + `<r><fgcolor=808080>` + ( match' + 
		'itemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcoun' + 
		't + ` item(s)`) )))';
			FilterBarPromptType := EXCASCADETREELib_TLB.exFilterPromptStartWith;
			FilterBarPromptVisible := Integer(EXCASCADETREELib_TLB.exFilterBarShowCloseIfRequired) Or Integer(EXCASCADETREELib_TLB.exFilterBarVisible) Or Integer(EXCASCADETREELib_TLB.exFilterBarPromptVisible);
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	ScrollPartVisible[EXCASCADETREELib_TLB.exVScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exHScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXCASCADETREELib_TLB.exVSBack] := $f0f0f0;
	Background[EXCASCADETREELib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXCASCADETREELib_TLB.exHSBack] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exHSThumb] := Background[EXCASCADETREELib_TLB.exVSThumb];
	Background[EXCASCADETREELib_TLB.exScrollSizeGrip] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exCSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exHSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $2;
	EndUpdate();
	BeginUpdate();
	MinColumnWidth := 348;
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	with DefaultView[Null].View['City'] do
	begin
		FilterBarPromptPattern := 'An';
	end;
	EndUpdate();
end
58
I am using the filter prompt feature, the question is how can I filter for items that starts with typed characters rather than contains

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			FilterBarPromptType := EXCASCADETREELib_TLB.exFilterPromptStartWith;
			FilterBarPromptVisible := EXCASCADETREELib_TLB.exFilterBarPromptVisible;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	with DefaultView[Null].View['City'] do
	begin
		FilterBarPromptPattern := 'An';
		with Columns.Item['Name'] do
		begin
			Width := 128;
			Def[EXCASCADETREELib_TLB.exCellValueFormat] := OleVariant(1);
			FormatColumn := 'value replace `An` with `<bgcolor=000000><fgcolor=FFFFFF>An</fgcolor></bgcolor>` ';
		end;
	end;
	EndUpdate();
end
57
FilterBarCaption Predefined Keywords

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	BackColorAlternate := RGB(240,240,240);
	Mode := EXCASCADETREELib_TLB.exSingleCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US';
	with DefaultView[Null].View['Country'] do
	begin
		with (IUnknown(Columns.Add('Pos')) as EXCASCADETREELib_TLB.Column) do
		begin
			Position := 0;
			Width := 32;
			AllowSizing := False;
			FormatColumn := '1pos ``';
		end;
		with Columns.Item['CountryCode'] do
		begin
			Width := 32;
			AllowSizing := False;
			DisplayFilterButton := True;
		end;
		with Columns.Item['CountryName'] do
		begin
			DisplayFilterButton := True;
			FilterList := Integer(EXCASCADETREELib_TLB.exShowExclude) Or Integer(EXCASCADETREELib_TLB.exShowFocusItem) Or Integer(EXCASCADETREELib_TLB.exShowCheckBox) Or Integer(EXCASCADETREELib_TLB.exSortItemsAsc);
			FilterBarDropDownWidth := 2;
			FilterType := EXCASCADETREELib_TLB.exFilter;
			Filter := 'Italy|Romania|Germany';
		end;
		FilterBarPromptPattern := 'a';
		ColumnAutoResize := True;
		SearchColumnIndex := Columns.Item['CountryName'].Index;
		FilterInclude := EXCASCADETREELib_TLB.exItemsWithChilds;
		FilterBarCaption := '`<fgcolor=0000FF><i>value/current</i></fgcolor>: <fgcolor=808080>` + value + `</fgcolor>` + `<br><fgcolor=0000FF><i>available</i' + 
	'></fgcolor>: ` + available + `<br><fgcolor=0000FF><i>allui</i></fgcolor>: ` + allui + `<br><fgcolor=0000FF><i>all</i></fgcolor>:' + 
	' ` + all + `<br><fgcolor=0000FF><i>itemcount</i></fgcolor>: <fgcolor=808080>` + itemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><' + 
	'i>visibleitemcount</i></fgcolor>: <fgcolor=808080>` + visibleitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>matchitemcount</i' + 
	'></fgcolor>: <fgcolor=808080>` + matchitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>promptpattern</i></fgcolor>: <fgcolor=80' + 
	'8080>` + promptpattern + `</fgcolor>`+ `<br><fgcolor=0000FF><i>leafitemcount</i></fgcolor>: <fgcolor=808080>` + leafitemcount + ' + 
	'`</fgcolor>`';
		FilterBarPromptVisible := Integer(EXCASCADETREELib_TLB.exFilterBarCaptionVisible) Or Integer(EXCASCADETREELib_TLB.exFilterBarVisible) Or Integer(EXCASCADETREELib_TLB.exFilterBarPromptVisible);
		ApplyFilter();
	end;
	EndUpdate();
end
56
How can I enable the column's filter bar (view)

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		View.FilterBarPromptVisible := EXCASCADETREELib_TLB.exFilterBarPromptVisible;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	with DefaultView[Null].View['Country'] do
	begin
		ColumnAutoResize := True;
		Columns.Item['CountryCode'].Visible := False;
		with Columns.Item['CountryName'] do
		begin
			DisplayFilterButton := True;
			FilterList := Integer(EXCASCADETREELib_TLB.exShowExclude) Or Integer(EXCASCADETREELib_TLB.exShowFocusItem) Or Integer(EXCASCADETREELib_TLB.exShowCheckBox) Or Integer(EXCASCADETREELib_TLB.exSortItemsAsc);
			FilterBarDropDownWidth := 2;
			FilterType := EXCASCADETREELib_TLB.exFilter;
			Filter := 'Romania|Germany';
		end;
		ApplyFilter();
	end;
	EndUpdate();
end
55
How can I enable the column's filter bar

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			FilterBarPromptVisible := EXCASCADETREELib_TLB.exFilterBarPromptVisible;
			with Columns.Item[OleVariant(0)] do
			begin
				DisplayFilterButton := True;
				FilterList := Integer(EXCASCADETREELib_TLB.exShowExclude) Or Integer(EXCASCADETREELib_TLB.exShowFocusItem) Or Integer(EXCASCADETREELib_TLB.exShowCheckBox) Or Integer(EXCASCADETREELib_TLB.exSortItemsAsc);
				FilterBarDropDownWidth := 2;
			end;
		end;
		with DefaultView[Null].View['Country'] do
		begin
			with Columns.Item[OleVariant(0)] do
			begin
				FilterType := EXCASCADETREELib_TLB.exFilter;
				Filter := 'US|RO|GE';
			end;
			ApplyFilter();
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
54
How can I enable the control's filter bar (view)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	DefaultView[Null].FilterBarPromptVisible := EXCASCADETREELib_TLB.exFilterBarPromptVisible;
	EndUpdate();
end
53
How can I enable the control's filter bar

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		View.FilterBarPromptVisible := EXCASCADETREELib_TLB.exFilterBarPromptVisible;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
52
Aggregate sum, min, max, count, avg, divider, total (view)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitEqualCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'RO';
	with DefaultView[Null].View['Country'] do
	begin
		BeginUpdate();
		ColumnAutoResize := True;
		Columns.Item[OleVariant(0)].Visible := False;
		with Items do
		begin
			LockedItemCount[EXCASCADETREELib_TLB.exTop] := 1;
			h := LockedItem[EXCASCADETREELib_TLB.exTop,0];
			ItemDivider[h] := 0;
			CellValueFormat[OleVariant(h),OleVariant(0)] := Integer(EXCASCADETREELib_TLB.exTotalField) Or Integer(EXCASCADETREELib_TLB.exHTML);
			CellValue[OleVariant(h),OleVariant(0)] := 'count(all,all,1)';
			FormatCell[OleVariant(h),OleVariant(0)] := '`<r>Countries: <b>`+ (value format `0`)';
		end;
		EndUpdate();
	end;
	EndUpdate();
end
51
Aggregate sum, min, max, count, avg, divider, total

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		View.HeaderVisible := False;
		with DefaultView[Null] do
		begin
			with View['Country'] do
			begin
				BeginUpdate();
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				with Items do
				begin
					LockedItemCount[EXCASCADETREELib_TLB.exTop] := 1;
					h := LockedItem[EXCASCADETREELib_TLB.exTop,0];
					ItemDivider[h] := 0;
					CellValueFormat[OleVariant(h),OleVariant(0)] := Integer(EXCASCADETREELib_TLB.exTotalField) Or Integer(EXCASCADETREELib_TLB.exHTML);
					CellValue[OleVariant(h),OleVariant(0)] := 'count(all,all,1)';
					FormatCell[OleVariant(h),OleVariant(0)] := '`<r>Countries: <b>`+ (value format `0`)';
				end;
				EndUpdate();
			end;
			with View['State'] do
			begin
				BeginUpdate();
				SingleSel := False;
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				with Items do
				begin
					LockedItemCount[EXCASCADETREELib_TLB.exTop] := 1;
					h := LockedItem[EXCASCADETREELib_TLB.exTop,0];
					ItemDivider[h] := 0;
					CellValueFormat[OleVariant(h),OleVariant(0)] := Integer(EXCASCADETREELib_TLB.exTotalField) Or Integer(EXCASCADETREELib_TLB.exHTML);
					CellValue[OleVariant(h),OleVariant(0)] := 'count(all,all,1)';
					FormatCell[OleVariant(h),OleVariant(0)] := '`<r>States: <b>`+ (value format `0`)';
				end;
				EndUpdate();
			end;
			with View['City'] do
			begin
				BeginUpdate();
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				with Columns.Item[OleVariant(2)] do
				begin
					Width := 128;
					HTMLCaption := 'CityName';
				end;
				with Items do
				begin
					LockedItemCount[EXCASCADETREELib_TLB.exTop] := 1;
					h := LockedItem[EXCASCADETREELib_TLB.exTop,0];
					ItemDivider[h] := 0;
					CellValueFormat[OleVariant(h),OleVariant(0)] := Integer(EXCASCADETREELib_TLB.exTotalField) Or Integer(EXCASCADETREELib_TLB.exHTML);
					CellValue[OleVariant(h),OleVariant(0)] := 'count(all,all,1)';
					FormatCell[OleVariant(h),OleVariant(0)] := '`<r>Cities: <b>`+ (value format `0`)';
				end;
				EndUpdate();
			end;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
50
How can I add a check-box column (view)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<c>Select multiple-items in the City view, and press <b>SPACE</b> key';
	Background[EXCASCADETREELib_TLB.exStatusBackColor] := BackColor;
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABO0GACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEhqGiUBihaQhRgyJI3RlJGaoDi' + 
	'KIokShKEpDLKlCx3H6OKQjOZgAoySo4SbDMp0NAkRBlFqcJCCCLAUgmTpQUBOYyiLKNRxQGoYLIlayZIiSIpMRbWcB3BYEOSFFasAAleYZTg2Jp1TbPAAYFL1ISDKSiI' + 
	'ZqTA6PheT5yUzCNazbgEMTvRKqcSnO6bOgnEKQZKAGg4bg1RTVAYZLKtPR7aqyUJvZ5sMB6DiuLYRPKXZoucaNExSS5ebJtOzQJbEXBpXSpBwzSieBozIaQcJUOoaVxP' + 
	'FkaJrGuIx3h2BZPgOUIQmUcIwDARAkiAaQxh0DonCMLAeBKZobBCCY+niWJaBIKJJH4MoBgiQpCmmUR/ooBgCgCYBIBYBoBmCBYAn+ApgkgNgOgOYQIEYBIEGESBWBSB' + 
	'JhGgZgZgYIYoHYEIHCGaIGAuCAiCgegkgkYYoh4KIFiKKIuBeAJimiGgwgwYoYk4NILCCGJmDqDpjkidg+gGTo1jUAxAEAgI');
	SelBackColor := $1000000;
	SelForeColor := ForeColor;
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	with DefaultView[Null].View['City'] do
	begin
		BeginUpdate();
		ShowFocusRect := False;
		SingleSel := False;
		Columns.Item[OleVariant(0)].Visible := False;
		Columns.Item[OleVariant(1)].Visible := False;
		with Columns.Item[OleVariant(2)] do
		begin
			HTMLCaption := 'City <off 4><fgcolor=808080>Name';
			Width := 128;
			Def[EXCASCADETREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		end;
		SearchColumnIndex := Columns.Item['Name'].Index;
		with (IUnknown(Columns.Add('Pos')) as EXCASCADETREELib_TLB.Column) do
		begin
			Position := 0;
			Width := 32;
			FormatColumn := '1 pos ``';
		end;
		with ConditionalFormats do
		begin
			Add('%CS2 = 1',Null).BackColor := $bebebe;
			with Add('%CS2 = 1',Null) do
			begin
				Bold := True;
				ApplyTo := EXCASCADETREELib_TLB.FormatApplyToEnum($8);
			end;
		end;
		with Items do
		begin
			CellState[OleVariant(ItemByIndex[1]),OleVariant(2)] := 1;
			CellState[OleVariant(ItemByIndex[3]),OleVariant(2)] := 1;
			CellState[OleVariant(ItemByIndex[5]),OleVariant(2)] := 1;
		end;
		EndUpdate();
	end;
	EndUpdate();
end
49
How can I add a check-box column

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			HeaderAppearance := EXCASCADETREELib_TLB.Etched;
			HeaderHeight := 24;
			DrawGridLines := EXCASCADETREELib_TLB.exVLines;
			GridLineStyle := EXCASCADETREELib_TLB.exGridLinesDash;
		end;
		with DefaultView[Null] do
		begin
			with View['Country'] do
			begin
				BeginUpdate();
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].HTMLCaption := 'Country <off 4><fgcolor=808080>Name';
				EndUpdate();
			end;
			with View['State'] do
			begin
				BeginUpdate();
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				Columns.Item[OleVariant(2)].HTMLCaption := 'State <off 4><fgcolor=808080>Name';
				EndUpdate();
			end;
			with View['City'] do
			begin
				BeginUpdate();
				ShowFocusRect := False;
				SingleSel := False;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				with Columns.Item[OleVariant(2)] do
				begin
					HTMLCaption := 'City <off 4><fgcolor=808080>Name';
					Width := 128;
					Def[EXCASCADETREELib_TLB.exCellHasCheckBox] := OleVariant(True);
				end;
				SearchColumnIndex := Columns.Item['Name'].Index;
				with (IUnknown(Columns.Add('Pos')) as EXCASCADETREELib_TLB.Column) do
				begin
					Position := 0;
					Width := 32;
					FormatColumn := '1 pos ``';
				end;
				with ConditionalFormats do
				begin
					Add('%CS2 = 1',Null).BackColor := $bebebe;
					with Add('%CS2 = 1',Null) do
					begin
						Bold := True;
						ApplyTo := EXCASCADETREELib_TLB.FormatApplyToEnum($8);
					end;
				end;
				with Items do
				begin
					CellState[OleVariant(ItemByIndex[1]),OleVariant(2)] := 1;
					CellState[OleVariant(ItemByIndex[3]),OleVariant(2)] := 1;
					CellState[OleVariant(ItemByIndex[5]),OleVariant(2)] := 1;
				end;
				EndUpdate();
			end;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<c>Select multiple-items in the City view, and press <b>SPACE</b> key';
	Background[EXCASCADETREELib_TLB.exStatusBackColor] := BackColor;
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABO0GACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEhqGiUBihaQhRgyJI3RlJGaoDi' + 
	'KIokShKEpDLKlCx3H6OKQjOZgAoySo4SbDMp0NAkRBlFqcJCCCLAUgmTpQUBOYyiLKNRxQGoYLIlayZIiSIpMRbWcB3BYEOSFFasAAleYZTg2Jp1TbPAAYFL1ISDKSiI' + 
	'ZqTA6PheT5yUzCNazbgEMTvRKqcSnO6bOgnEKQZKAGg4bg1RTVAYZLKtPR7aqyUJvZ5sMB6DiuLYRPKXZoucaNExSS5ebJtOzQJbEXBpXSpBwzSieBozIaQcJUOoaVxP' + 
	'FkaJrGuIx3h2BZPgOUIQmUcIwDARAkiAaQxh0DonCMLAeBKZobBCCY+niWJaBIKJJH4MoBgiQpCmmUR/ooBgCgCYBIBYBoBmCBYAn+ApgkgNgOgOYQIEYBIEGESBWBSB' + 
	'JhGgZgZgYIYoHYEIHCGaIGAuCAiCgegkgkYYoh4KIFiKKIuBeAJimiGgwgwYoYk4NILCCGJmDqDpjkidg+gGTo1jUAxAEAgI');
	SelBackColor := $1000000;
	SelForeColor := ForeColor;
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
48
How can I access a view

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			HeaderAppearance := EXCASCADETREELib_TLB.Etched;
			HeaderHeight := 24;
			DrawGridLines := EXCASCADETREELib_TLB.exAllLines;
			GridLineStyle := EXCASCADETREELib_TLB.exGridLinesDash;
		end;
		with DefaultView[Null] do
		begin
			with View['Country'] do
			begin
				BeginUpdate();
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].HTMLCaption := 'Country <off 4><fgcolor=808080>Name';
				EndUpdate();
			end;
			with View['State'] do
			begin
				BeginUpdate();
				ColumnAutoResize := True;
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				Columns.Item[OleVariant(2)].HTMLCaption := 'State <off 4><fgcolor=808080>Name';
				EndUpdate();
			end;
			with View['City'] do
			begin
				BeginUpdate();
				Columns.Item[OleVariant(0)].Visible := False;
				Columns.Item[OleVariant(1)].Visible := False;
				with Columns.Item[OleVariant(2)] do
				begin
					HTMLCaption := 'City <off 4><fgcolor=808080>Name';
					Width := 128;
					Def[EXCASCADETREELib_TLB.exCellBackColor] := OleVariant(15790320);
				end;
				CountLockedColumns := 1;
				EndUpdate();
			end;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
47
Conditional Format (check)

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			with ConditionalFormats.Add('%CS0 = 1',Null) do
			begin
				Bold := True;
			end;
			Columns.Item[OleVariant(0)].Def[EXCASCADETREELib_TLB.exCellHasCheckBox] := OleVariant(True);
			with Items do
			begin
				CellState[OleVariant(FocusItem),OleVariant(0)] := 1;
			end;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
46
Conditional Format (view)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	with DefaultView[Null].View['City'] do
	begin
		with ConditionalFormats.Add('(%0 = `US`) and (%2 like `Al*`)',Null) do
		begin
			Bold := True;
			BackColor := $f0f0f0;
		end;
	end;
	EndUpdate();
end
45
Conditional Format

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			with ConditionalFormats.Add('%0 = `US`',Null) do
			begin
				Bold := True;
			end;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
44
I've seen the AllowSplitView property, the question is how can I load data to

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	AllowSplitView := EXCASCADETREELib_TLB.exAllowOneSplitView;
	SplitViewHeight := 256;
	with (IUnknown(DefaultView[OleVariant(1)]) as _TLB.Object) do
	begin
	end;
	EndUpdate();
end
43
How can I group the items (view)

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		View.SingleSel := False;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABa0GACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgkAoJDYOMjwlDKEgADDFEgjJBkRxtDCPIDnGQoDi' + 
	'GI4vSrCQ4yDA8GxCGSfIrjKiYbiGNY8RgZCiOMAFJSpC6gZRoSq4doGGJLQiDMaAdBNHyZKqpbQqeCZPDINQlWzbcrjKKFYQTOi7I4sCbYcqKA5PTbNd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BGA0RwtDcVIgkgNgOgOYQIDiXYEmESBWBaB' + 
	'ZhggTgSgYYZIHYGoDGGaIGBiBpiCiFJdgkIksiiChhliLgsgYYpoj4F4MGMKBWDSDRhngMg4gcIQYnYPoEE6N4ZAMQBAICA=');
	end;
	SelBackColor := $1000000;
	SelForeColor := RGB(0,0,0);
	BackColorHeader := $2000000;
	ScrollPartVisible[EXCASCADETREELib_TLB.exVScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exHScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXCASCADETREELib_TLB.exVSBack] := $f0f0f0;
	Background[EXCASCADETREELib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXCASCADETREELib_TLB.exHSBack] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exHSThumb] := Background[EXCASCADETREELib_TLB.exVSThumb];
	Background[EXCASCADETREELib_TLB.exScrollSizeGrip] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exCSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exHSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $2;
	BackColorSortBar := BackColor;
	EndUpdate();
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'RO\CJ|BV|CS';
	with DefaultView[Null].View['City'] do
	begin
		BeginUpdate();
		with Columns do
		begin
			Item['CountryCode'].Visible := False;
			with Item['Name'] do
			begin
				SortOrder := EXCASCADETREELib_TLB.SortAscending;
				Width := 128;
			end;
		end;
		SortBarVisible := True;
		AllowGroupBy := True;
		SingleSort := False;
		Columns.Item['StateCode'].SortOrder := EXCASCADETREELib_TLB.SortAscending;
		TreeColumnIndex := Columns.Item['Name'].Index;
		EndUpdate();
	end;
	EndUpdate();
end
42
How can I group the items

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Columns("StateCode").Visible = False
	// Columns("StateName").SortOrder = 1
	// Columns("StateCode").SortOrder = nGroupByIfCity
	with CascadeTree1 do
	begin
		nGroupByIfCity := FormatABC('( A = `City`) ? 1 : 0',View.Tag,Null,Null);
		bColumnAutoResize := FormatABC(' (A = `City`) ? 0 : -1',View.Tag,Null,Null);
		with View do
		begin
			BeginUpdate();
			SingleSel := False;
			Columns.Item['CountryCode'].Visible := False;
			Columns.Item['CountryName'].SortOrder := EXCASCADETREELib_TLB.SortAscending;
			with Columns.Item[OleVariant(2)] do
			begin
			end;
			TreeColumnIndex := 2;
			AllowGroupBy := True;
			SingleSort := False;
			SortBarVisible := False;
			ColumnAutoResize := False;
			EndUpdate();
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABa0GACA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OjZXoCKJDQzVYADFRVd4rMK9QABWw4YqWZYXX7kUDxbTdEYzPQAMw1GCcbxmF6eWbCNq3LidXTnOK3dwkO55cyuA6oazi8T6Bi2M6DDQNGSzZiuGZ9YSOOIwHJIN4Q' + 
	'DSUpYmQOoJA6KxVlCDBsnwOx9iWUhfiCThzjUHZun2WgSAiBIUA0JgziGVJkGWUZAkEUoyBEN51BsDYQhCIQJGqHAUCAGBGA0RwtDcVIgkgNgOgOYQIDiXYEmESBWBaB' + 
	'ZhggTgSgYYZIHYGoDGGaIGBiBpiCiFJdgkIksiiChhliLgsgYYpoj4F4MGMKBWDSDRhngMg4gcIQYnYPoEE6N4ZAMQBAICA=');
	end;
	SelBackColor := $1000000;
	SelForeColor := RGB(0,0,0);
	BackColorHeader := $2000000;
	ScrollPartVisible[EXCASCADETREELib_TLB.exVScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exHScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXCASCADETREELib_TLB.exVSBack] := $f0f0f0;
	Background[EXCASCADETREELib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXCASCADETREELib_TLB.exHSBack] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exHSThumb] := Background[EXCASCADETREELib_TLB.exVSThumb];
	Background[EXCASCADETREELib_TLB.exScrollSizeGrip] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exCSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exHSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $2;
	BackColorSortBar := BackColor;
	EndUpdate();
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'RO\CJ|BV|CS';
	EndUpdate();
end
41
How can I change the visual appearance of the selection/header

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Columns("StateCode").Visible = False
	// Columns("StateName").SortOrder = 1
	with CascadeTree1 do
	begin
		with View do
		begin
			BeginUpdate();
			ColumnAutoResize := True;
			Columns.Item['CountryCode'].Visible := False;
			Columns.Item['CountryName'].SortOrder := EXCASCADETREELib_TLB.SortAscending;
			with Columns.Item['Name'] do
			begin
			end;
			EndUpdate();
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABWYDg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADCNAwgFBIcBhE4ZIKkEYoMiONoYR5Ac4yFA' + 
	'cQxHE6TZRgeDZToWN48TZLEB0VRFGL1J4AKbfKKKBiqIZDTpMdKSHIIFQ4BiEaYkGjqQpKVIdDSJMwWTI4ahhNSE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hgoDRHuEIbAbwFigHoDMDYgwEBRCGFgOIERxAAH+IgMQiA3AMBwIsB4RhuAsEUCMUwKRZh4E2BMAwGBRiFAiFYFIRQRCtAmEUDgTQKCRDcC4YoSB' + 
	'eBUHGBAbgGBIiMFSI8XAqQNiGG4HARwEQ/A1GMKEJQVRDjYHUBsSI5gejHFQPkDoBQWB2BUMMeAeAHCJASCEUgLBDiQAGHQMQig0gGB4AcHghBJAyCEEkCoaQMApFILw' + 
	'R4kg5BuCUJUHILwRgQHiFMSQUhHBKCSAkFgMQig8EYBUCQPA5hICSFpKgeBzCUHEKANwjAwhTBAMcPgrRLgjHkF0ZYmQWgtFKKwW4lApDCCuEwLIYQXjFCYLUCochwBy' + 
	'GWMkTQOxzB4HKJccQrgyhMGSJ0Go5hCDTA2MMDwZRKgxH2DQEw+ByicBmIQVYTRYhXBsMUMIVhNjjEkHUZw0RvA5BOCgY4FRJiiDqE4BI7QcCmGSFMToExogVCcOkbIO' + 
	'xzhaBmJ0AYnA1AMdoCsKIJQEgfHoB4QQDAJCtCGGgHoEQMDiFtPIKQrAdDNHiAMEAICAgA==');
	end;
	SelBackColor := $1000000;
	SelForeColor := RGB(0,0,0);
	BackColorHeader := $2000000;
	ScrollPartVisible[EXCASCADETREELib_TLB.exVScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exHScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXCASCADETREELib_TLB.exVSBack] := $f0f0f0;
	Background[EXCASCADETREELib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXCASCADETREELib_TLB.exHSBack] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exHSThumb] := Background[EXCASCADETREELib_TLB.exVSThumb];
	Background[EXCASCADETREELib_TLB.exScrollSizeGrip] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exCSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exHSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $2;
	BackColorSortBar := BackColor;
	EndUpdate();
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'RO\CJ';
	EndUpdate();
end
40
How can I format a column so it display its content in a different way
// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Columns("StateCode").Visible = False
	with CascadeTree1 do
	begin
		with View do
		begin
			BeginUpdate();
			ContinueColumnScroll := False;
			ScrollBySingleLine := True;
			DrawGridLines := EXCASCADETREELib_TLB.exAllLines;
			EnsureVisibleColumn('Date');
			Columns.Item['CountryCode'].Visible := False;
			with Columns.Item['Date'] do
			begin
			end;
			with Columns.Item['Function'] do
			begin
			end;
			with Columns.Item['Coordinates'] do
			begin
			end;
			with Columns.Item['Status'] do
			begin
			end;
			EndUpdate();
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	FitCascadeColumns := 7;
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	ScrollWidth := 4;
	ScrollHeight := 4;
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\OR';
	EndUpdate();
end
39
How can I add a position column

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			with (IUnknown(Columns.Add('Pos')) as EXCASCADETREELib_TLB.Column) do
			begin
				Width := 32;
				AllowSizing := False;
				Position := 0;
				FormatColumn := '1 pos ``';
				Def[EXCASCADETREELib_TLB.exCellBackColor] := OleVariant(15790320);
				Alignment := EXCASCADETREELib_TLB.RightAlignment;
				HeaderAlignment := Alignment;
				Def[EXCASCADETREELib_TLB.exCellPaddingRight] := OleVariant(2);
				Def[EXCASCADETREELib_TLB.exCellPaddingLeft] := OleVariant(2);
				Def[EXCASCADETREELib_TLB.exHeaderPaddingLeft] := OleVariant(2);
				Def[EXCASCADETREELib_TLB.exHeaderPaddingRight] := OleVariant(2);
			end;
			CountLockedColumns := 1;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\IA';
	EndUpdate();
end
38
How can I display icons or images

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			EnsureVisibleColumn('Function');
			with Columns.Item['Function'] do
			begin
			end;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 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=');
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\MN';
	EndUpdate();
end
37
How can I turn-on the control's status bar

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		StatusBarLabel := FormatABC('`<b>` + ( value replace `\\` with ` </b><font ;6><off 4>` )',OleVariant(Name),Null,Null);
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

// ViewEndChanging event - Occurs once the user is about to change the view.
procedure TForm1.CascadeTree1ViewEndChanging(ASender: TObject; Operation : ViewOperationEnum);
begin
	with CascadeTree1 do
	begin
		StatusBarLabel := FormatABC('`<b>` + ( value replace `\\` with ` </b><font ;6><off 4>` )',OleVariant(Name),Null,Null);
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarHeight := 24;
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Name := 'Romania\Cluj\Baciu*';
	EndUpdate();
end
36
How can I disable incremental searching
// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		View.AutoSearch := False;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
35
ScrollBar extension

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Columns("StateCode").Visible = False
	with CascadeTree1 do
	begin
		with View do
		begin
			ColumnAutoResize := True;
			Columns.Item['CountryCode'].Visible := False;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	ScrollPartVisible[EXCASCADETREELib_TLB.exVScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exHScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXCASCADETREELib_TLB.exVSBack] := $f0f0f0;
	Background[EXCASCADETREELib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXCASCADETREELib_TLB.exHSBack] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exHSThumb] := Background[EXCASCADETREELib_TLB.exVSThumb];
	Background[EXCASCADETREELib_TLB.exScrollSizeGrip] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exCSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exHSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $2;
	EndUpdate();
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	DefaultView[Null].Columns.Item['CountryName'].SortOrder := EXCASCADETREELib_TLB.SortAscending;
	DefaultView[Null].NextView.Columns.Item['StateName'].SortOrder := EXCASCADETREELib_TLB.SortAscending;
	with DefaultView[Null].NextView.NextView do
	begin
		ColumnAutoResize := False;
		with Columns.Item['Name'] do
		begin
			SortOrder := EXCASCADETREELib_TLB.SortAscending;
			Width := 128;
		end;
		with Items do
		begin
			SelectItem[FindItem['Anchorage','Name',Null]] := True;
		end;
	end;
	EndUpdate();
end
34
How can I access the next/prev/parent/child view

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Columns("StateCode").Visible = False
	with CascadeTree1 do
	begin
		with View do
		begin
			ColumnAutoResize := True;
			Columns.Item['CountryCode'].Visible := False;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitEqualCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'RO\CJ';
	DefaultView[Null].Columns.Item['CountryName'].SortOrder := EXCASCADETREELib_TLB.SortAscending;
	DefaultView[Null].NextView.Columns.Item['StateName'].SortOrder := EXCASCADETREELib_TLB.SortAscending;
	with DefaultView[Null].NextView.NextView do
	begin
		BeginUpdate();
		ColumnAutoResize := False;
		with Columns.Item['Name'] do
		begin
			Width := 128;
			SortOrder := EXCASCADETREELib_TLB.SortAscending;
		end;
		SingleSort := False;
		AllowGroupBy := True;
		Columns.Item['Status'].SortOrder := EXCASCADETREELib_TLB.SortDescending;
		TreeColumnIndex := Columns.Item['Name'].Index;
		EndUpdate();
	end;
	EndUpdate();
end
33
Predefined Keywords of ShowContextMenu property

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Columns("StateCode").Visible = False
	with CascadeTree1 do
	begin
		with View do
		begin
			ColumnAutoResize := True;
			Columns.Item['CountryCode'].Visible := False;
		end;
		StatusBarLabel := FormatABC('`<b>` + ( value replace `\\` with ` </b><font ;6><off 4>` )',OleVariant(Name),Null,Null);
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

// ViewEndChanging event - Occurs once the user is about to change the view.
procedure TForm1.CascadeTree1ViewEndChanging(ASender: TObject; Operation : ViewOperationEnum);
begin
	with CascadeTree1 do
	begin
		StatusBarLabel := FormatABC('`<b>` + ( value replace `\\` with ` </b><font ;6><off 4>` )',OleVariant(Name),Null,Null);
		ExecuteContextMenu := 0;
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	AllowSplitView := EXCASCADETREELib_TLB.exAllowOneSplitView;
	FitCascadeColumns := 3;
	Mode := EXCASCADETREELib_TLB.exSplitEqualCascadeMode;
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarHeight := 24;
	ScrollPartVisible[EXCASCADETREELib_TLB.exVScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exHScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXCASCADETREELib_TLB.exScroll,EXCASCADETREELib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXCASCADETREELib_TLB.exVSBack] := $f0f0f0;
	Background[EXCASCADETREELib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXCASCADETREELib_TLB.exHSBack] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exHSThumb] := Background[EXCASCADETREELib_TLB.exVSThumb];
	Background[EXCASCADETREELib_TLB.exScrollSizeGrip] := Background[EXCASCADETREELib_TLB.exVSBack];
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Background[EXCASCADETREELib_TLB.exCSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exHSplitBar] := Background[EXCASCADETREELib_TLB.exSplitBar];
	Background[EXCASCADETREELib_TLB.exSplitBarSize] := $2;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	ShowContextMenu := '`vlevels=` + vlevels + `,vlevel=` + vlevel + `,hlevels=` + hlevels + `,hlevel=` + hlevel + `,view=` + view ';
	SplitViewHeight := '256';
	EndUpdate();
end
32
How can I display the identifiers of the control's context menu (debug)

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Columns("StateCode").Visible = False
	with CascadeTree1 do
	begin
		with View do
		begin
			ColumnAutoResize := True;
			Columns.Item['CountryCode'].Visible := False;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

// ViewEndChanging event - Occurs once the user is about to change the view.
procedure TForm1.CascadeTree1ViewEndChanging(ASender: TObject; Operation : ViewOperationEnum);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( ExecuteContextMenu );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	ShowContextMenu := '[debug]Popup(Item 1[id=1001],Item 2[id=1002],Item 3[id=1003]),[sep],Exit[def][id=1000]';
	EndUpdate();
end
31
ShowContextMenu usage

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Columns("StateCode").Visible = False
	with CascadeTree1 do
	begin
		with View do
		begin
			ColumnAutoResize := True;
			Columns.Item['CountryCode'].Visible := False;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

// ViewEndChanging event - Occurs once the user is about to change the view.
procedure TForm1.CascadeTree1ViewEndChanging(ASender: TObject; Operation : ViewOperationEnum);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( ExecuteContextMenu );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	ShowContextMenu := 'Popup(Item 1[id=1001],Item 2[id=1002],Item 3[id=1003]),[sep],Exit[def][id=1000]';
	EndUpdate();
end
30
How can I resize automatically all views, when the control is resized

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Columns("StateCode").Visible = False
	with CascadeTree1 do
	begin
		with View do
		begin
			ColumnAutoResize := True;
			Columns.Item['CountryCode'].Visible := False;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := Integer(EXCASCADETREELib_TLB.exAutoFitOnResizeClient) Or Integer(EXCASCADETREELib_TLB.exSplitFixCascadeMode);
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
29
How can I hide some columns

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	// Columns("StateCode").Visible = False
	with CascadeTree1 do
	begin
		with View do
		begin
			ColumnAutoResize := True;
			Columns.Item['CountryCode'].Visible := False;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
28
Is it possible to disable resizing the cascade columns

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		View.ColumnAutoResize := True;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Mode := Integer(EXCASCADETREELib_TLB.exAutoFitOnResizeClient) Or Integer(EXCASCADETREELib_TLB.exDisableResizeCascadeColumns) Or Integer(EXCASCADETREELib_TLB.exSplitFixCascadeMode);
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
27
SplitFixCascadeMode Mode

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
26
FixCascadeMode Mode

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DefColumnWidth := 96;
	Mode := EXCASCADETREELib_TLB.exFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
25
SplitEqualCascadeMode Mode

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	Mode := EXCASCADETREELib_TLB.exSplitEqualCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
24
Default Mode

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Background[EXCASCADETREELib_TLB.exSplitBar] := $c4c4c4;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
23
SingleCascadeMode ( single-view )

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSingleCascadeMode;
	with DefaultView[Null] do
	begin
		DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Cities Where CountryCode = ''RO'' ';
		AllowGroupBy := True;
		SortBarVisible := True;
		Columns.Item['StateCode'].SortOrder := EXCASCADETREELib_TLB.SortAscending;
		Name := 'Name';
	end;
	Name := 'Isaccea';
	EndUpdate();
end
22
How can I display the current selection, as a path

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		StatusBarLabel := Name;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

// ViewEndChanging event - Occurs once the user is about to change the view.
procedure TForm1.CascadeTree1ViewEndChanging(ASender: TObject; Operation : ViewOperationEnum);
begin
	with CascadeTree1 do
	begin
		StatusBarLabel := Name;
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
21
How can I add multiple-views to the control

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitFixCascadeMode;
	DataSource := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;Tag=Cou' + 
	'ntry;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName' + 
	';Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Select * ' + 
	'FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name';
	Select := 'US\AK';
	EndUpdate();
end
20
I wish I select items based on names, rather than keys. Is that possible

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		View.ColumnAutoResize := False;
		label := FormatABC('`<b>Select = </b>` + value',OleVariant(Select),Null,Null);
		label := FormatABC('A + `<br>` + `<b>Name = </b>` + B replace `|` with ` `',OleVariant(label),OleVariant(Name),Null);
		StatusBarLabel := label;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

// ViewEndChanging event - Occurs once the user is about to change the view.
procedure TForm1.CascadeTree1ViewEndChanging(ASender: TObject; Operation : ViewOperationEnum);
begin
	with CascadeTree1 do
	begin
		label := FormatABC('`<b>Select = </b>` + value',OleVariant(Select),Null,Null);
		label := FormatABC('A + `<br>` + `<b>Name = </b>` + B replace `|` with ` `',OleVariant(label),OleVariant(Name),Null);
		StatusBarLabel := label;
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitEqualCascadeMode;
	StatusBarVisible := Integer(EXCASCADETREELib_TLB.exStatusBarWordWrap) Or Integer(EXCASCADETREELib_TLB.exStatusBarAnchorTop);
	ds := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb';
	dm1 := 'Member=Select * FROM Countries;Key=CountryCode;Tag=Country;Name=CountryName';
	ds := FormatABC('A + `;` + B',OleVariant(ds),OleVariant(dm1),Null);
	dm2 := 'Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName;Tag=State ||| Member=Sele' + 
	'ct * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name';
	ds := FormatABC('A + ` >>> ` + B',OleVariant(ds),OleVariant(dm2),Null);
	dm3 := 'Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=Cit' + 
	'y;Name=Name';
	ds := FormatABC('A + ` >>> ` + B',OleVariant(ds),OleVariant(dm3),Null);
	DataSource := OleVariant(ds);
	Name := 'Romania\Cluj\Baciu*';
	EndUpdate();
end
19
I've noticed that I can't select multiple items. How can I do that

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		bColumnAutoResize := FormatABC('not(A = `City`)',View.Tag,Null,Null);
		with View do
		begin
			SingleSel := False;
			ColumnAutoResize := False;
		end;
		label := FormatABC('`<b>Select = </b>` + value',OleVariant(Select),Null,Null);
		label := FormatABC('A + `<br>` + `<b>Name = </b>` + B replace `|` with ` `',OleVariant(label),OleVariant(Name),Null);
		StatusBarLabel := label;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

// ViewEndChanging event - Occurs once the user is about to change the view.
procedure TForm1.CascadeTree1ViewEndChanging(ASender: TObject; Operation : ViewOperationEnum);
begin
	with CascadeTree1 do
	begin
		label := FormatABC('`<b>Select = </b>` + value',OleVariant(Select),Null,Null);
		label := FormatABC('A + `<br>` + `<b>Name = </b>` + B replace `|` with ` `',OleVariant(label),OleVariant(Name),Null);
		StatusBarLabel := label;
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitEqualCascadeMode;
	StatusBarVisible := Integer(EXCASCADETREELib_TLB.exStatusBarWordWrap) Or Integer(EXCASCADETREELib_TLB.exStatusBarAnchorTop);
	StatusBarHeight := 48;
	ds := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb';
	dm1 := 'Member=Select * FROM Countries;Key=CountryCode;Tag=Country;Name=CountryName';
	ds := FormatABC('A + `;` + B',OleVariant(ds),OleVariant(dm1),Null);
	dm2 := 'Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName;Tag=State ||| Member=Sele' + 
	'ct * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name';
	ds := FormatABC('A + ` >>> ` + B',OleVariant(ds),OleVariant(dm2),Null);
	dm3 := 'Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=Cit' + 
	'y;Name=Name';
	ds := FormatABC('A + ` >>> ` + B',OleVariant(ds),OleVariant(dm3),Null);
	DataSource := OleVariant(ds);
	Select := 'RO\CJ|D*';
	EndUpdate();
end
18
How do I programmatically selects a path/item

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		bColumnAutoResize := FormatABC('not(A = `City`)',View.Tag,Null,Null);
		View.ColumnAutoResize := False;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

// ViewEndChanging event - Occurs once the user is about to change the view.
procedure TForm1.CascadeTree1ViewEndChanging(ASender: TObject; Operation : ViewOperationEnum);
begin
	with CascadeTree1 do
	begin
		StatusBarLabel := CascadeTree1.Select;
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSplitEqualCascadeMode;
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorBottom;
	ds := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb';
	dm1 := 'Member=Select * FROM Countries;Key=CountryCode;Tag=Country';
	ds := FormatABC('A + `;` + B',OleVariant(ds),OleVariant(dm1),Null);
	dm2 := 'Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Tag=State ||| Member=Select * FROM Citie' + 
	's WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City';
	ds := FormatABC('A + ` >>> ` + B',OleVariant(ds),OleVariant(dm2),Null);
	dm3 := 'Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=Cit' + 
	'y';
	ds := FormatABC('A + ` >>> ` + B',OleVariant(ds),OleVariant(dm3),Null);
	DataSource := OleVariant(ds);
	Select := 'RO\CJ';
	EndUpdate();
end
17
DataSource/DataMember/Key/Tag

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		StatusBarLabel := FormatABC('value replace `data source` with `<b><fgcolor=808080>Source</fgcolor></b>` replace `Source` with `<b><fgcolor=808080>Source</fgc' + 
		'olor></b>` replace `Member` with `<b><fgcolor=808080>Member</fgcolor></b>` replace `Key` with `<b><fgcolor=808080>Key</fgcolor><' + 
		'/b>` replace `Tag` with `<b><fgcolor=808080>Tag</fgcolor></b>` replace `;` with `;<br>`',View.DataSource,Null,Null);
		bColumnAutoResize := FormatABC('not(A = `City`)',View.Tag,Null,Null);
		nWidth := FormatABC('A = `City` ? B : C',View.Tag,View.WidthToFit,View.Width);
		with View do
		begin
			ColumnAutoResize := False;
			Width := nWidth;
		end;
	end
end;

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarHeight := 58;
	StatusBarVisible := Integer(EXCASCADETREELib_TLB.exStatusBarWordWrap) Or Integer(EXCASCADETREELib_TLB.exStatusBarAnchorTop);
	ds := 'Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb';
	dm1 := 'Member=Select * FROM Countries;Key=CountryCode;Tag=Country';
	ds := FormatABC('A + `;` + B',OleVariant(ds),OleVariant(dm1),Null);
	dm2 := 'Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Tag=State ||| Member=Select * FROM Citie' + 
	's WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City';
	ds := FormatABC('A + ` >>> ` + B',OleVariant(ds),OleVariant(dm2),Null);
	dm3 := 'Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=Cit' + 
	'y';
	ds := FormatABC('A + ` >>> ` + B',OleVariant(ds),OleVariant(dm3),Null);
	DataSource := OleVariant(ds);
	EndUpdate();
end
16
DataSource (view, data source, data member, ACCDB)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could "Data Source=...;Data Member=..." or "Source=...;Member=..." ';
	DefColumnWidth := 336;
	ds := 'Data Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb';
	dm := 'Data Member=Select * FROM Countries';
	with DefaultView[Null] do
	begin
		DataSource := CascadeTree1.FormatABC('A + `;` + B',OleVariant(ds),OleVariant(dm),Null);
		ColumnAutoResize := True;
	end;
	EndUpdate();
end
15
DataSource (view, data source, data member, MDB)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could "Data Source=...;Data Member=..." or "Source=...;Member=..." ';
	DefColumnWidth := 336;
	ds := 'Data Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.mdb';
	dm := 'Data Member=Select * FROM Countries';
	with DefaultView[Null] do
	begin
		DataSource := CascadeTree1.FormatABC('A + `;` + B',OleVariant(ds),OleVariant(dm),Null);
		ColumnAutoResize := True;
	end;
	EndUpdate();
end
14
DataSource (view, ADODB, ACCDB)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could be string (Source/Member), ADO or DAO objects';
	DefColumnWidth := 336;
	ado := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset'))) as ADODB_TLB.Recordset);
	with ado do
	begin
		Open('Countries','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb',3,3,Null);
	end;
	with DefaultView[Null] do
	begin
		DataSource := (IUnknown(ado) as ADODB_TLB.Recordset);
		ColumnAutoResize := True;
	end;
	EndUpdate();
end
13
DataSource (view, ADODB, MDB)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could be string (Source/Member), ADO or DAO objects';
	DefColumnWidth := 336;
	ado := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset'))) as ADODB_TLB.Recordset);
	with ado do
	begin
		Open('Countries','Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.mdb',3,3,Null);
	end;
	with DefaultView[Null] do
	begin
		DataSource := (IUnknown(ado) as ADODB_TLB.Recordset);
		ColumnAutoResize := True;
	end;
	EndUpdate();
end
12
DataSource (control, data source, data member, ACCDB)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could "Data Source=...;Data Member=..." or "Source=...;Member=..." ';
	DefColumnWidth := 336;
	ds := 'Data Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb';
	dm := 'Data Member=Select * FROM Countries';
	DataSource := FormatABC('A + `;` + B',OleVariant(ds),OleVariant(dm),Null);
	View.ColumnAutoResize := True;
	EndUpdate();
end
11
DataSource (control, data source, data member, MDB)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could "Data Source=...;Data Member=..." or "Source=...;Member=..." ';
	DefColumnWidth := 336;
	ds := 'Data Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.mdb';
	dm := 'Data Member=Select * FROM Countries';
	DataSource := FormatABC('A + `;` + B',OleVariant(ds),OleVariant(dm),Null);
	View.ColumnAutoResize := True;
	EndUpdate();
end
10
DataSource (control, ADODB, ACCDB)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could be string (Source/Member), ADO or DAO objects';
	DefColumnWidth := 336;
	ado := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset'))) as ADODB_TLB.Recordset);
	with ado do
	begin
		Open('Countries','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.accdb',3,3,Null);
	end;
	DataSource := (IUnknown(ado) as ADODB_TLB.Recordset);
	View.ColumnAutoResize := True;
	EndUpdate();
end
9
DataSource (control, ADODB, MDB)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could be string (Source/Member), ADO or DAO objects';
	DefColumnWidth := 336;
	ado := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset'))) as ADODB_TLB.Recordset);
	with ado do
	begin
		Open('Countries','Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExCascadeTree\Sample\Access\cities.mdb',3,3,Null);
	end;
	DataSource := (IUnknown(ado) as ADODB_TLB.Recordset);
	View.ColumnAutoResize := True;
	EndUpdate();
end
8
DataSource (view, XMLDOMDocument)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could be a XML file name, a URL, an IStream, an IXMLDOMDocument';
	DefColumnWidth := 336;
	with DefaultView[Null] do
	begin
		xml := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('MSXML.DOMDocument'))) as MSXML2_TLB.FreeThreadedDOMDocument30);
		with xml do
		begin
			load('C:\Program Files\Exontrol\ExCascadeTree\Sample\Testing.xml');
		end;
		DataSource := (IUnknown(xml) as MSXML2_TLB.FreeThreadedDOMDocument30);
		ColumnAutoResize := True;
	end;
	EndUpdate();
end
7
DataSource (view, XML, file)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could be a XML file name, a URL, an IStream, an IXMLDOMDocument';
	DefColumnWidth := 336;
	with DefaultView[Null] do
	begin
		DataSource := 'http://www.exontrol.net/testing.xml';
		ColumnAutoResize := True;
	end;
	EndUpdate();
end
6
DataSource (control, XMLDOMDocument)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could be a XML file name, a URL, an IStream, an IXMLDOMDocument';
	DefColumnWidth := 336;
	xml := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('MSXML.DOMDocument'))) as MSXML2_TLB.FreeThreadedDOMDocument30);
	with xml do
	begin
		load('C:\Program Files\Exontrol\ExCascadeTree\Sample\Testing.xml');
	end;
	DataSource := (IUnknown(xml) as MSXML2_TLB.FreeThreadedDOMDocument30);
	View.ColumnAutoResize := True;
	EndUpdate();
end
5
DataSource (control, XML, file)

// Error event - An internal error occurs.
procedure TForm1.CascadeTree1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Error' );
		OutputDebugString( Description );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	StatusBarVisible := EXCASCADETREELib_TLB.exStatusBarAnchorTop;
	StatusBarLabel := '<b>DataSource</b> could be a XML file name, a URL, an IStream, an IXMLDOMDocument';
	DefColumnWidth := 336;
	DataSource := 'http://www.exontrol.net/testing.xml';
	View.ColumnAutoResize := True;
	EndUpdate();
end
4
How can I get the selected items (sample 1)

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			k := ParentView.Value[Null];
			BeginUpdate();
			ColumnAutoResize := True;
			Key := OleVariant(-1);
			Columns.Add(k);
			with Items do
			begin
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 1`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 2`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 3`',OleVariant(k),Null,Null));
			end;
			EndUpdate();
		end;
	end
end;

// ViewEndChanging event - Occurs once the user is about to change the view.
procedure TForm1.CascadeTree1ViewEndChanging(ASender: TObject; Operation : ViewOperationEnum);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'End' );
		OutputDebugString( Operation );
		with View.Items do
		begin
			OutputDebugString( 'FocusItem' );
			OutputDebugString( CellCaption[OleVariant(FocusItem),OleVariant(0)] );
			OutputDebugString( 'SelectedItem' );
			OutputDebugString( CellCaption[OleVariant(SelectedItem[0]),OleVariant(0)] );
		end;
	end
end;

// ViewStartChanging event - Occurs once the user is about to change the view.
procedure TForm1.CascadeTree1ViewStartChanging(ASender: TObject; Operation : ViewOperationEnum);
begin
	with CascadeTree1 do
	begin
		OutputDebugString( 'Start' );
		OutputDebugString( Operation );
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	with View do
	begin
		BeginUpdate();
		ColumnAutoResize := True;
		Columns.Add('Default');
		Key := OleVariant(0);
		LinesAtRoot := EXCASCADETREELib_TLB.exLinesAtRoot;
		with Items do
		begin
			AddItem('Item A');
			SelectItem[AddItem('Item B')] := True;
			AddItem('Item C');
		end;
		EndUpdate();
	end;
	EndUpdate();
end
3
Can I use this control as a simple tree

with CascadeTree1 do
begin
	BeginUpdate();
	Mode := EXCASCADETREELib_TLB.exSingleCascadeMode;
	with View do
	begin
		BeginUpdate();
		ColumnAutoResize := True;
		Columns.Add('Default');
		Key := OleVariant(-1);
		LinesAtRoot := EXCASCADETREELib_TLB.exLinesAtRoot;
		with Items do
		begin
			AddItem('Item A');
			InsertItem(AddItem('Item B'),Null,'Child');
			AddItem('Item C');
		end;
		EndUpdate();
	end;
	EndUpdate();
end
2
How can I use this control

// CreateView event - A view has been created.
procedure TForm1.CascadeTree1CreateView(ASender: TObject; View : IView);
begin
	with CascadeTree1 do
	begin
		with View do
		begin
			k := ParentView.Value[Null];
			BeginUpdate();
			ColumnAutoResize := True;
			Columns.Add(k);
			with Items do
			begin
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 1`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 2`',OleVariant(k),Null,Null));
				AddItem(CascadeTree1.FormatABC('A + `-> Sub-Item 3`',OleVariant(k),Null,Null));
			end;
			EndUpdate();
		end;
	end
end;

with CascadeTree1 do
begin
	BeginUpdate();
	with View do
	begin
		BeginUpdate();
		ColumnAutoResize := True;
		Columns.Add('Default');
		Key := OleVariant(0);
		with Items do
		begin
			AddItem('Item A');
			SelectItem[AddItem('Item B')] := True;
			AddItem('Item C');
		end;
		EndUpdate();
	end;
	EndUpdate();
end
1
How do I change the control's background color
with CascadeTree1 do
begin
	BackColor := RGB(240,240,240);
end