AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.10.2006, 18:22   #1  
Blog bot is offline
Blog bot
Участник
 
25,607 / 848 (80) +++++++
Регистрация: 28.10.2006
Axapta Lessons: Add menu options to the Add-Ins submenu
Источник: http://axapta-lessons-learned.blogsp...s-submenu.html
==============
When we right-click on an object in the AOT a shortcut menu opens. This shortcut menu is called Context Menu and has an Add-Ins menu where we can find various development tools.

Most of the development tools that we can find under Tools, option Development tools are available under the Add-Ins menu.

Let us have a look at such a context menu for the table DlvTerm.

Open the AOT.
Open the node Data Dictionary.
Open the node Tables and locate the table DlvTerm.
Right-click on the table object DlvTerm and select Add-Ins from the shortcut menu.




The menu items on the Add-Ins submenu are defined in the Menu sysContextMenu.


All items in the Menu sysContextMenu are automatically added to the Add-Ins submenu.

Standard the Add-Ins submenu contains different items depending on the object that is selected. If we open the Add-Ins submenu for the field Code on the table DlvTerm,
we will see that the next items are not available:
* Developer Documentation
* Table definitions
* Table browser
* Auto-report
* Visual MorphXplorer
* Application Hierarchy Tree
* Source Code Titlecase Update



When we select the submenu Add-Ins from the context menu the method verifyItem on the class sysContextMenu is automatically called.

The method verifies for each item in the Menu sysContextMenu whether it should become available in the current context.

The method verifyItem(identifiername MenuItemName, MenuItemType MenuItemType) takes the name of the menu item and the menu item type as parameters and must return 0 (zero) if the item should not be available.

The method verifyItem disables the menu item Table browser when the object is not of type Table.




Note: When we add our own menu items to the Add-Ins submenu we will have to add our own logic to the method verifyItem in case we want to disable the availability of a menu item in certain contexts.


We can add our own tool to the Add-ins menu as follows:
1. Create a menu item for the object.
2. Use a drag-and-drop operation to move the menu item to the menu sysContextMenu.

Let us look at an example:
1. Created menu item ContextMenuTest (Label Context Menu Test). It is an empty menu item, meaning no Object is specified.

2. Drag-and-drop the new menu item to the menu sysContextMenu.
Now the menu sysContextMenu looks as follows:


3. Check how this looks for the table DlvTerm



[End of Lesson]


==============
Источник: http://axapta-lessons-learned.blogsp...s-submenu.html
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Axapta Lessons: Menus. Blog bot DAX Blogs 0 23.11.2006 16:00
Axapta Lessons: Menu Item Properties. Blog bot DAX Blogs 0 23.11.2006 16:00
Axapta Lessons: Menu Items Blog bot DAX Blogs 0 23.11.2006 16:00
Axapta Lessons: FORM SalesTable (3): Add a document to the button Posting Blog bot DAX Blogs 0 28.10.2006 18:22
Axapta Lessons: Extending the Tools menu and submenus Blog bot DAX Blogs 0 28.10.2006 18:22

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 23:26.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.