VCL Delphi

var
Item: TMenuItem;
begin
Item := TMenuItem.Create(Popup1);
Item.Caption := 'A new menu item';
Popup1.Items.Insert(2, Item);
end;