A customer contacted me and sent me some screenshots of a menu themed with PowerToolbar that had several menu items missing from the last menu on the menubar. It was obvious that something was not working correctly so I asked him to export the appframe to TXA and email it to me. After duplicating this problem yesterday I spent couple of hours today investigating what was going on. Here is a screenshot of the menu:
Something was obviously wrong and my initial investigation wasn't promising. The API calls that get the information about each menu item simply weren't returning the text for the menu items! My suspicion was directed to a big menu with several levels of submenus as a possible culprit because it was the menu next before the trouble menu. So I cut it out of the source and lo and behold the Help menu worked again! I painstakingly copied the items and menus back into the menu until the Help menu failed and I had found the culprit.
One of the MENU statement had the HIDE attribute on it, and something about that set the menu item organization completely off and plunged the next menu into a deep hole! The fix was very simple, just remove the HIDE attribute from the MENU and add a one line of code into ThisWindow.Init to hide the menu.
?ReportsAddressBook2 {PROP:Hide} = TRUE
That's all there was to fix this problem. The menu now looks like it should:
This customer had also noticed another problem which was that the hotkey text on a menu item would disappear if the menu had a submenu and the submenu had been displayed. After some digging around I also found the culprit for that problem. When the submenu opened and closed the hotkeys for the items in the parent menu weren't reloaded so the width of each item was set to 0. This caused the hotkey text to be effectively drawn to the right of the menu. This is now fixed in build 2.0.118 which will be made available to the public after the weekend:)
Arnor Baldvinsson