Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Create Hidden Sub-Menus using the Profile Helpers
When you create items on a Toolbox page, some of them might be very similar and be based on the same type of Metaclass. For example, there are many different types of Action element and, in BPMN 2.0, you can create each type of Event element either stand-alone or edge-mounted on another element. Rather than populate a Toolbox page with every variation, you can create a 'base' Toolbox item and offer a choice of variant from a Sub-Menu, which is displayed when the base item is dragged onto the diagram but is otherwise hidden. This technique is very useful for 'disambiguating' Stereotypes that can be applied to multiple Metaclasses.
Define a hidden sub-menu
Step |
Action |
See also |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 |
If you have not already, create and display the diagram you will be using to define your toolbox, as described in steps 1 to 6 of the Create Toolbox Profiles using the Profile Helpers topic. |
Create Toolbox Profiles using the Profile Helpers
|
||||||||||||
2 |
Drag the Add a Toolbox Page item from the Profile Helpers toolbox page onto the diagram. The Add Toolbox Page Dialog is displayed.
|
|
||||||||||||
3 |
In the Name field, enter the name for sub-menu toolbox item; for example, MySubmenu
|
|
||||||||||||
4 |
The Tool Tip field, can be left blank in this case.
|
|
||||||||||||
5 |
Enable the Is Hidden check box. The Images Only, Is Common and Is Collapsed check boxes should be left disabled.
|
|
||||||||||||
6 |
After enabling the Is Hidden check box. The Icon field should become active. You can optionally add a custom Icon image for the sub-menu toolbox item. The icon image must be a 16x16 pixel bitmap file; for a transparent background use light grey - RGB(192,192,192). To set the icon for the sub-menu toolbox item, click on the folder icon which is found to the right of the Icon field. Locate the image file and click the Open button.
|
|
||||||||||||
7 |
You can now add items such as elements and connectors to the sub-menu. Click on the down arrow which is located on the right side of the Add button. Select one of the following options:
If you simply click on the Add button, and not the drop down arrow, this will provide the same functionality as the Add Stereotype option.
|
|
||||||||||||
8 |
(Optional) After adding the toolbox item it will appear in the Toolbox Items list. You can optionally add a custom Icon image for a toolbox item. The icon image must be a 16x16 pixel bitmap file; for a transparent background use light grey - RGB(192,192,192). To set the icon for a toolbox item, locate the item in the Toolbox Items list and click within the Toolbox Icon column. Click on the ellipsis (.) within this column. The Select a Toolbox Icon dialog displays. Locate the image file and click the Open button.
|
|
||||||||||||
9 |
Repeat steps 7 and 8 for each item you want to add to the Sub-Menu. If you want to remove a toolbox item, select it from the Toolbox Items list and click on the Delete button. Once all the appropriate Sub-Menu items have been added click on the OK button. A Stereotype element will be added to your toolbox profile diagram.
|
|
||||||||||||
10 |
Repeat steps 2 to 9 for each toolbox sub-menu you want to create.
|
|
||||||||||||
11 |
The sub-menu(s) created above can now be included as an item in a toolbox page. |
Create Toolbox Profiles using the Profile Helpers
|
Notes
• | After a Sub-Menu has been defined you can modify its properties again by right clicking the appropriate stereotype element on the toolbox profile diagram and selecting Edit with Profile Helper |
Learn more