Floating ToolWindow error
Kevin
✭✭
in RobotStudio
When I run the API Help 'Add ToolWindow' example:
[CODE]Project.UndoContext.BeginUndoStep("AddToolWindow");
[CODE]Project.UndoContext.BeginUndoStep("AddToolWindow");
try
{
// How to create a ToolWindow and dock it in different places.
// Add it tabbed on the left side.
ToolWindow tw = new ToolWindow("MyToolWindow_1");
tw.Caption = "Tabbed on the left side.";
UIEnvironment.Windows.AddTabbed(tw, UIEnvironment.Windows["ObjectBrowser"] as ToolWindow);
// Add it docked on the right side.
ToolWindow tw2 = new ToolWindow("MyToolWindow_2");
tw2.Caption = "Docked on the right side.";
UIEnvironment.Windows.AddDocked(tw2, DockStyle.Right);
// Add a floating ToolWindow.
ToolWindow tw3 = new ToolWindow("MyToolWindow_3");
tw3.Caption = "Floating ToolWindow.";
UIEnvironment.Windows.Add(tw3);
}
catch (Exception e)
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw e;
}
finally
{
Project.UndoContext.EndUndoStep();
}[/CODE] ... the first two ToolWindows work OK, but the line: [CODE]UIEnvironment.Windows.Add(tw3);
[/CODE] gives this error:
If I click 'Close' the floating ToolWindow appears OK.
I do not know what is meant by 'user defined breakpoint'.
Can anyone replicate this behaviour?
Thanks,
Kevin
0
Comments
-
Hi Kevin,
I could reproduce this, there is a (unnecessary) call to Debug.Break() which really shouldn't have been in a release build.. The workaround is to add the window docked, then float it.
[code] UIEnvironment.Windows.AddDocked(tw3, DockStyle.Right);
tw3.Float();[/code]
regards,
Johannes
Johannes Weiman
Software Engineer
ABB Robotics0 -
Thanks Johannes,
That works OK.
Regards,
Kevin
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 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)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings