About   -   Contact   -   Purchase   -   Search   -   What's New

Invisible vs. Enabled
When designing the menus for your application try to design them in such a way that you never need to alter a menu item to make it invisible. Changing the visible attribute is probably the most expensive operation you can perform in PowerBuilder. This is because PowerBuilder destroys the complete menu and rebuilds it again from scratch.

The normal rule of thumb for menu items to be invisible/enabled is that if the user never has access to the menu item during the execution of the application it should be invisible. If it is just unavailable at that point in the application then disable the item. If you cannot avoid making a menu item invisible then a guide I normally use is that for a single menu item I will use the visible attribute but if it is two or more items then I would make two copies of the menu and just load the correct menu at run time. This makes you EXE a little larger but it will run much faster.


Top of Page

Legal Notice

Ken Howe 2011