Re: Any ideas for the menu? Anyone ? Anyone?

From: DanHW <danhw_at_aol.com>
Date: 1997/11/20
Message-ID: <19971120062201.BAA29096_at_ladder02.news.aol.com>#1/1


> Andi asks...
>How best do I go about reconciling this all into some kind of
>reference/master
>
>menu that ideally allows "Derived" child menus to
>
>1) have their own individual sub menus if necessary.
>2) Hide or display certain menu items on a per- child basis.
>
>Template menus seem too restricted.
>
>
If I understand you correctly, you want to dynamically change the menu, either  at form-startup, or during the execution of the form.

If you can determine at runtime (and it can change during runtime) what menu  options you need to display, you can hide menu options using the  SET_MENU_PROPERTY function (using the DISPLAY attribute). This means you  create a monster menu with all the options, and hide the ones that are not  needed. The PL/SQL code that is executed when the menu is selected should  basically be limited to something like

EXECUTE_TRIGGER('form_trigger').

This allows each form to have the code specific to the form to execute that  particular function. As an example, suppose there is a menu option to  'Duplicate the current record'. You could, at form start up, change the label  to 'Duplicate Client' for one form, 'Duplicate Order' for another form. The  menu item executes a form trigger you have named 'duplicate_my_record'. In the  first form, the trigger does whatever is needed to duplicate a client, while  in the 2nd form, the same named trigger does what ever is needed to duplicate  an order.

Hope this helps.

DanHW

 Keep in mind that if you are using MDI, each window has its own menu. Received on Thu Nov 20 1997 - 00:00:00 CET

Original text of this message