Combination View Flat View Tree View
Threads [ Previous | Next ]
How to remove menu item?
toggle
How to remove menu item?
8/26/11 10:13 AM
Hi,

I successfully used REMOVE_MENU_ITEM to remove a whole menu. However, it fails to remove a single menu item. Since I don't know where the menu items are configured, I tried to remove from within a ON_EVENT "AppInitialized" listener that i defined in the external coupling (Externe Anbindung) part of the library attributes.

For example, let's assume there is a menu "Modell" within the modeling component and "Modell" has an item called "Anwendungsmodelle".

CC "Application" REMOVE_MENU_ITEM component:"modeling" item:"Modell"

This works, but instead of removing the whole menu I only want to remove on of its items:

CC "Application" REMOVE_MENU_ITEM component:"modeling" item:"Anwendungsmodelle"

This does not work (error code: CLASS_NOT_EXISTING). I also tried

CC "Application" REMOVE_MENU_ITEM component:"modeling" item:"Modell\Anwendungsmodelle"

but it did not work either.

Any ideas?

Thanks,

Stefan
Flag Flag
RE: How to remove menu item?
8/26/11 3:11 PM as a reply to Stefan Hofer.
CC "Application" REMOVE_MENU_ITEM component:"modeling" item:"Model\tApplication models..." (or CC "Application" REMOVE_MENU_ITEM component:"modeling" item:"Modell\tAnwendungsmodelle...") will remove "Application models..." menu item from high-level menu "Model".

The sub-menu items need to be separated from the high-level menu items by "\t".
Flag Flag
RE: How to remove menu item?
8/29/11 12:11 PM as a reply to Stefan Hofer.
Hi Stefan,

Is is working now with the \t as menu separator? Here is the relevant part from the docs as you may already know..

1REMOVE_MENU_ITEM component: Component item: strValue .
2
3--> RESULT ecode: intValue .
4
5Component : "acquisition" | "modeling" | "analysis" |
6
7"simulation" | "evaluation" | "importexport" | "all"
8
Flag Flag
RE: How to remove menu item?
8/29/11 1:24 PM as a reply to Dominik Hofbauer.
Hi,

works like a charm!

Thanks a lot,

Stefan
Flag Flag