SPECIAL OFFER        Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming!

⤷ Create PopUp menu inside other PopUp

Use Insert method for adding SubPopupItem to a PopUp menu.

procedure TForm1.MyShow(Sender: TObject);
begin
  with Sender as TMenuItem do ShowMessage(Caption);
end;

procedure TForm1.First1Click(Sender: TObject);
var
  MyPopUpItems: array[0..2] of TMenuItem;
  i: Integer;
begin
  for i:=0 to 2 do
  begin
    MyPopUpItems[i]:=TMenuItem.Create(Self);
    MyPopUpItems[i].Caption:='New item '+IntToStr(i);
    PopupMenu1.Items[1].Insert(i, MyPopupItems[i]);
    MyPopUpItems[i].OnClick:=MyShow;
  end;
end;
More for developers
Databases for Amazon Associates
Amazon Categories
Amazon Nodes