RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMenuItem.Delete Method

Removes a menu item from the Items property array.

Pascal
procedure Delete(Index: Integer);
C++
__fastcall Delete(int Index);

Call Delete to remove a menu item and all its submenus from a menu. The Index parameter is the index of the item to be deleted, where 0 specifies the first item in the menu, 1 specifies the second item, and so on. 

Delete does not free the removed item's memory. To remove an item from the menu and free its memory, call the Free method in the item you want to remove. 

To temporarily hide a menu item, without deleting it, use the Visible property. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!