Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TAdvTreeView
Modifying the appearance of the TAdvCheckedTreeView with custom node indicators
Modifying the appearance of the TAdvCheckedTreeView with custom node indicators
Example:
procedure TForm1.FormCreate(Sender: TObject); var pn, n: TAdvTreeViewNode; I: Integer; begin AdvCheckedTreeView1.BeginUpdate; AdvCheckedTreeView1.ClearNodes; AdvCheckedTreeView1.ClearColumns; AdvCheckedTreeView1.Columns.Add.Text := ''''; AdvCheckedTreeView1.ColumnsAppearance.Layouts := []; AdvCheckedTreeView1.NodesAppearance.ShowLines := False; AdvCheckedTreeView1.NodesAppearance.LevelIndent := 0; AdvCheckedTreeView1.Color := RGB(51, 51, 51); AdvCheckedTreeView1.NodesAppearance.FontColor := clWhite; pn := AdvCheckedTreeView1.Nodes.Add; pn.Text[0] := ''Audi''; n := pn.Nodes.Add; n.Text[0] := ''A3''; n.CheckTypes[0] := tvntCheckBox; n := pn.Nodes.Add; n.Text[0] := ''A5''; n.CheckTypes[0] := tvntCheckBox; n := pn.Nodes.Add; n.Text[0] := ''R8 Spyder''; n.CheckTypes[0] := tvntCheckBox; pn := AdvCheckedTreeView1.Nodes.Add; pn.Text[0] := ''Mercedes''; n := pn.Nodes.Add; n.Text[0] := ''SLS''; n.CheckTypes[0] := tvntCheckBox; n := pn.Nodes.Add; n.Text[0] := ''SLK''; n.CheckTypes[0] := tvntCheckBox; n := pn.Nodes.Add; n.Text[0] := ''Maybach''; n.CheckTypes[0] := tvntCheckBox; n := pn.Nodes.Add; n.Text[0] := ''Sports Tourer''; n.CheckTypes[0] := tvntCheckBox; n := pn.Nodes.Add; n.Text[0] := ''Electric Drive''; n.CheckTypes[0] := tvntCheckBox; n := pn.Nodes.Add; n.Text[0] := ''Coupé''; n.CheckTypes[0] := tvntCheckBox; AdvCheckedTreeView1.NodesAppearance.ExpandNodeIcon.LoadFromFile(''ExpandIcon.png''); AdvCheckedTreeView1.NodesAppearance.CollapseNodeIcon.LoadFromFile(''CollapseIcon.png''); AdvCheckedTreeView1.NodesAppearance.ExpandWidth := 16; AdvCheckedTreeView1.NodesAppearance.ExpandHeight := 16; AdvCheckedTreeView1.EndUpdate; AdvCheckedTreeView1.ExpandAll; end;