I have a window with a menu. I need to change menu item visible property to false or True base on a global variable value. Could you guys guide me to a sample or maybe you can tell how to reference the menu via PB script.
Regards,
Clarence.
I have a window with a menu. I need to change menu item visible property to false or True base on a global variable value. Could you guys guide me to a sample or maybe you can tell how to reference the menu via PB script.
Regards,
Clarence.
If your instance variable is of the same type as your ancestor you can only access the menu items that are defined in the ancestor class but not the items you added in the the descendant. But you will get the item properties of the class you used in the window. If your instance variable is of type of the used (inherited) class you can access all menu items.
If you use conditionally different menus in a window you may write code that conditionally use different variables (lm_menu1, lm_menu2, ...).
Or you write a menu function or event (define in parent menu) that changes the menu item for you. Call this function or event from your window. So you have the logic in your menu and not in your window.