Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TAdvSmoothListBox
Grouping items

With the AdvSmoothListBox it is possible to group the items and expand or collapse them with a single click. The level property on an item allows you to define the different groups to collapse or expand. The indent property can be used to visually create a “node” that is indented to the right. An item has a public expanded property. With this property you can expand or collapse items with a level that is higher than the current item.

Sample:
with AdvSmoothListBox5.Items.Add do
begin
  Caption := 'Mercedes';
  GraphicLeftType := gtSmoothButton;
  ButtonCaption := '-';
  ButtonBevelColor := clBlack;
  ButtonColor := clGreen;
  GraphicLeftWidth := 25;
end;
with AdvSmoothListBox5.Items.Add do
begin
  Level := 1;
  Caption := 'Mercedes SLK Roadster';
  Indent := 30;
end;
with AdvSmoothListBox5.Items.Add do
begin
  Level := 1;
  Caption := 'Mercedes SLR Coupé';
  Indent := 30;
end;
with AdvSmoothListBox5.Items.Add do
begin
  Level := 1;
  Caption := 'Mercedes GLK 4x4';
  Indent := 30;
end;

with AdvSmoothListBox5.Items.Add do
begin
  Caption := 'BMW';
  GraphicLeftType := gtSmoothButton;
  ButtonCaption := '-';
  ButtonBevelColor := clBlack;
  ButtonColor := clGreen;
  GraphicLeftWidth := 25;
end;
with AdvSmoothListBox5.Items.Add do
begin
  Level := 1;
  Caption := 'BMW M3';
  Indent := 30;
end;
with AdvSmoothListBox5.Items.Add do
begin
  Level := 1;
  Caption := 'BMW Z4';
  Indent := 30;
end;
with AdvSmoothListBox5.Items.Add do
begin
  Level := 1;
  Caption := 'BMW X5';
  Indent := 30;
end;

with AdvSmoothListBox5.Items.Add do
begin
  Caption := 'Land Rover';
  GraphicLeftType := gtSmoothButton;
  ButtonCaption := '-';
  ButtonBevelColor := clBlack;
  ButtonColor := clGreen;
  GraphicLeftWidth := 25;
end;
with AdvSmoothListBox5.Items.Add do
begin
  Level := 1;
  Caption := 'Land Rover Defender 90';
  Indent := 30;
end;
with AdvSmoothListBox5.Items.Add do
begin
  Level := 1;
  Caption := 'Land Rover Series III';
  Indent := 30;
end;
with AdvSmoothListBox5.Items.Add do
begin
  Level := 1;
  Caption := 'Range Rover Sport V8';
  Indent := 30;
end;

Result: