Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I implement dynamic menus in COOL:Gen?

cool Dynamic Gen implement menus
0
Posted

How can I implement dynamic menus in COOL:Gen?

0

WinFun offers several functions to manipulate menu items. Each menu and submenu has its own handle. These can be obtained with rnGetMainMenuHandle and rnGetSubMenuHandle. Once you have the handle of a menu or submenu you can operate on its menu items. You can change the caption (and mnemonic) of a menu item and you can delete a menu item. However you cannot add a menu item as it not possible to associate a newly added item with event logic in your action diagram. So if you want to offer a different set of menu options for a different set of users you must create your window with as many items on it as you there are options in total, and associate them with event logic in the normal way. For each user you must decide which items are valid and delete those which are invalid using rnDeleteMenuItem, normally in the window Open event. You can change the caption and meaning of a specific menu item with rnSetMenuCaption. If you do this you will probably want to have an IF statement in the eve

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123