Frequently Asked Component Specific Questions
Options |
|
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>

TMS Advanced Dropdown ControlsAdding Images in TAdvMultiColumnDropDown
Assign an imagelist to the TAdvMultiColumnDropDown Control, choose a column with the columntype ctImage, this will allow the StringGrid to display images.
AdvMultiColumnDropDown1.DropDownAutoWidth := true;
with AdvMultiColumnDropDown1.Columns.Add do
begin
Header := 'Column 1';
AutoSize := true;
end;
with AdvMultiColumnDropDown1.Columns.Add do
begin
Header := 'Column 2';
AutoSize := true;
end;
with AdvMultiColumnDropDown1.Columns.Add do
begin
Header := 'Column 3';
AutoSize := true;
end;
with AdvMultiColumnDropDown1.Columns.Add do
begin
Header := 'Column 4';
ColumnType := ctImage;
end;
it := AdvMultiColumnDropDown1.Items.Add;
it.Text.Add('Item 1 at column 1');
it.Text.Add('Item 1 at column 2');
it.Text.Add('Item 1 at column 3');
it.ImageIndex := 0;
it := AdvMultiColumnDropDown1.Items.Add;
it.Text.Add('Item 2 at column 1');
it.Text.Add('Item 2 at column 2');
it.Text.Add('Item 2 at column 3');
it.ImageIndex := 1;