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

TAdvSmoothMegaMenuAdding Sections and Items
Adding a root menu with a section and 5 items
with AdvSmoothMegaMenu1.MenuItems.Add do
begin
Caption := 'Hello World !';
with Menu.Sections.Add do
begin
Caption := 'Section 0';
Items.Add.Text := 'Item 1';
Items.Add.Text := 'Item 2';
Items.Add.Text := 'Item 3';
Items.Add.Text := 'Item 4';
Items.Add.Text := 'Item 5';
end;
end; with AdvSmoothMegaMenu1.MenuItems.Add do
begin
Caption := 'Hello World !';
Menu.SectionLayout := slHorizontal;
// Menu.SectionLayout := slVertical;
for I := 0 to 1 do
begin
with Menu.Sections.Add do
begin
Caption := 'Section ' + inttostr(I);
Items.Add.Text := 'Item 1';
Items.Add.Text := 'Item 2';
Items.Add.Text := 'Item 3';
Items.Add.Text := 'Item 4';
Items.Add.Text := 'Item 5';
end;
end;
end; with AdvSmoothMegaMenu1.MenuItems.Add do
begin
Caption := 'Hello World !';
with Menu.Sections.Add do
begin
Caption := 'Section 0';
Items.Add.Text := 'Item 1';
Items.Add.Text := 'Item 2';
Items.Add.Text := 'Item 3';
Items.Add.Text := 'Item 4';
Items.Add.Text := 'Item 5';
Items.Add.ItemType := itBreak;
Items.Add.Text := 'Item 1';
Items.Add.Text := 'Item 2';
Items.Add.Text := 'Item 3';
Items.Add.Text := 'Item 4';
Items.Add.Text := 'Item 5';
end;
end;