Очень хороший пример в форме DocuView method init()
X++:
void init()
{
...
while select docuType
index TypeIdx
{
itemButtonCtrl = menuCtrl.addControlFormControlType::MENUFUNCTIONBUTTON,docuType.TypeId);
itemButtonCtrl.menuItemType(MenuItemType::Action);
itemButtonCtrl.menuItemName(menuItemActionStr(DocuActionNew));
itemButtonCtrl.text(docuType.TypeId);
}
super();
...
}
имеется также обработчик новых кнопок...
Успехов