Re: Dynamic Menus

From: DanHW <danhw_at_aol.com>
Date: 3 Jan 1999 15:56:34 GMT
Message-ID: <19990103105634.08200.00006198_at_ng-fb1.aol.com>


>Is there a way I can create a menu mmx file that will read from a database
>table and build the menu labels and code dynamically.
>
>I am running Forms 4.5 and the SET_ITEM_PROPERTY command seems to have very
>few properties it can set, the label is OK but the code is the stumbling

>block
>
>Otherwise is there anyway I can dynamically create menu items and/or groups
>
>Even if you aware of any later version functionality, it would be a help.
>

You have to fool it... build your menu with enough entries for the option you want. In your program, use the set_item_property to set the label and the displayed attribute. The menu item can use the 'execute_trigger' command and execute a block of code on the CURRENT FORM (note the FORM not the menu!). For example, a menu will execute trigger 'opt1'. Somewhere appropriate in the form, set the displayed and label attributes of the menu item. Also, in the form, create a form trigger 'opt1' that does what you want.

Not perfect, but it gets a lot of the work done.

HTH
Dan Hekimian-Williams Received on Sun Jan 03 1999 - 16:56:34 CET

Original text of this message