When I use a menu in the command bar and disable the functionality of the menu (.enable=FALSE) the menu is disabled. I also use this functionality in a sub item of the menu item (pull down menu appears) When I enable the functionality of the menu items only the item in the command bar is updated and not the sub item. (.enable=TRUE)
Figure indicates both items are disabled.
Figure indicates both items are enabled. (Note: only the item in the command bar is updated)
I?_Tll already tried update() and Refresh() but this does not solve the problem!
Sorry but I’m not sure that I understand your problem…Can you please share the part of your code that enables/disables the different menu items and point out which part of the code that doesn’t work as expected.
If the robot is in automode it has to disable the menu’s, when it is in manual mode the 2 items must be enabled. The problem is that only the item in the commandbar (Tool) is enabled and the item (Stocklin I/O) stay’s disabled. Note: When I close the subitem (System) and open it again it is also enabeled!
The Enable property of the MenuItem forces to repaint its container only when it belongs to a CommandBar (consistent with the Menu_Tool). But, in the case of Menu_Stocklin, this MenuItem is attached to a MenuItem, not a CommandBar
The UI which displays the list of submenu only paints itself after it is opened and after you click on it. Maybe, as a work around, you could close the SubMenu and let the operator open it again (if needed).