TMenuItemInsert (C++)
Description
The following code inserts a menu item after the first item in a menu named FileMenu.
Code
void __fastcall TForm1::InsertMenuItemClick(TObject *Sender)
{
TMenuItem *NewItem = new TMenuItem(FileMenu);
try
{
NewItem->Caption = "Form1";
FileMenu->Insert(1, NewItem);
}
catch (Exception &e)
{
delete NewItem;
throw;
}
}
Uses
- Vcl.Menus.TMenuItem.Insert ( fr | de | ja )