Sub Menu item in Commnandbar not updated
Jaaahhh
✭
Hello People,<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I have the following problem.
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.
<?: prefix = v ns = "urn:schemas-microsoft-com:vml" />
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!
Thanks for the help.
Edwin Peeters
0
Comments
-
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.Lennart H0
-
Thanks for the quick response,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!Here it is :If soAutoOn.Value = 1 Then
' Robot in automatic mode
Me.Menu_Tool.Enabled = False
Me.Menu_Stocklin.Enabled = False
Else
' Robot in manual mode
Me.Menu_Tool.Enabled = True
Me.Menu_Stocklin.Enabled = True
End If
Greetings,0 -
Hi ... are you running this code while the subitems list is opened?Carlos Martinez
ABB0 -
Yes Carlos, you are right, when I close and open it again it's enabled.Greetings,Edwin0
-
Hi again,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 CommandBarThe 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).BRCarlos Martinez
ABB0 -
Small comment, not sure if it's relevant or notI follow your logic using C# and FlexPendant SDK 5.13 and the menu closes if it's open when I run the code below.private void cmdBoth_Click(object sender, EventArgs e)
{
if (menuItem3.Enabled == true && menuItem1.Enabled == true)
{
menuItem3.Enabled = false;
menuItem1.Enabled = false;
}
else
{
menuItem3.Enabled = true;
menuItem1.Enabled = true;
}
}
Lennart H0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings