Kbase P86311: How to hide a menu-item in adm2
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
How to hide a menu-item in adm2
FIX:
As there is no HIDDEN attribute for a menu item a possible solution to hiding a menu item is to reload the menu without the item included thus mimicking a hidden item.
For example, with a smartwindow with sdo/sdv and toolbar, if the 'add' item is to be removed from the tableio menu then the following code will remove the item and set the remaining items correctly (assuming code is run when on the first record in the recordset). Code may be from a trigger or in the initializeObject procedure of the container:
DYNAMIC-FUNCTION('deleteMenu':U IN h_dyntoolbar).
DYNAMIC-FUNCTION('insertMenu' IN h_dyntoolbar,
INPUT "",
INPUT "File,Navigation",
INPUT NO,
INPUT ?).
DYNAMIC-FUNCTION('insertMenu' IN h_dyntoolbar,
INPUT "File":U,
INPUT "Copy,Delete,RULE,save,reset,cancel,RULE,Exit":U,
INPUT YES, /* expand children */
INPUT ?).
DYNAMIC-FUNCTION('buildmenu':U IN h_dyntoolbar, INPUT "").
DYNAMIC-FUNCTION('enableActions':U IN h_dyntoolbar,
INPUT "Copy,Delete,Exit,Next,Last" ).