WeifenLuo DockPanel Suite:嵌入TabControl

时间:2016-06-25 12:23:17

标签: .net winforms c++-cli dockpanel

我是DockPanel Suite的新手 我想要实现的是,在Winforms中的TabControl中使用Dockpanel组件(使用DocumentStyle = DockingMdi)。 如果我将DocumentStyle设置为DockingWindow或DockingSdi,它可以正常工作,但对接选项更少

SecondForm ^SF = gcnew SecondForm ();
SF->Show(dockPanel1, DockState::Document);

将DocumentStyle设置为DockingMdi我收到运行时错误

  

类型'System.InvalidOperationException'的未处理异常   发生在WeifenLuo.WinFormsUI.Docking.dll

     

其他信息:无效的父表单。使用DockingMdi或时   SystemMdi文档样式,DockPanel控件必须是子级   控制主MDI容器形式。

我在SF-> Show()之上添加SF->Parent = this;,我收到一个新的运行时错误

  

发生了'System.ArgumentException'类型的未处理异常   System.Windows.Forms.dll中

     

其他信息:无法将顶级控件添加到a   控制。

0 个答案:

没有答案
相关问题