Create a Popup Menu in your program.
As near as I can tell, there is no programmatic way to modify (add/delete items) TPopup menu. All changes to the contents must be done at design time.
If you need to create Popup (aka context menu, aka right click menus) on the fly, Borland provides you with a couple of functions to accomplish this:
NewPopupMenu
NewSubMenu
NewItem
So lets build a basic Popup Menu.
TPopupMenu *BuildPopup(TComponent *owner)
{
TMenuItem *menus[10];
AnsiString menuText,menuName;
int menuCnt;
menuCnt = 0;
// generate the menu items and put in a array
for (int i=0; i < 10; i++ )
{
menuText.sprintf("Menu Position %d", i+1);
menuName.sprintf("Menu%d",i+1);
menus[i] = NewItem(menuText,NULL,false,true,NULL,-1,menuName);
menuCnt++;
}
// create the popup menu
return NewPopupMenu(owner, "SampleMenu", paLeft, true, menus, menuCnt-1);
}
This builds a menu that looks something like this:

