当我执行程序时TabControl内容消失
我有一个包含许多控件的表单,其中包括 TabControl
。
当我执行程序时出现问题,tabPage 的内容消失。
下面是Form执行前后的图片以及源代码。
I have a Form that contains many controls including TabControl
.
The problem occurs when I execute the program, the contents of the tabPage disappear.
The following are pictures of the Form before and after the Execute and the source code.
Source Code: http://www.mediafire.com/?8d19lx1h2wwgl3m
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很难确定,因为使用“Telerik.WinControls”资源我无法运行代码。
这就是说,您加载主窗体的方式似乎有问题。我认为问题是您可以在 Visual Studio 中的设计器中看到控件,但在代码运行时看不到。要解决此问题,请删除
Main_Load
方法,并将其内容放置在默认的Main
构造函数中,就像在Main.cs
文件中一样。删除该行
然后从
Main.Designer.cs
文件中It is hard to say for sure as with 'Telerik.WinControls' resource I can't run the code.
That said it looks to be a problem with how you are loading the Main Form. I presume the issue being you can see the controls in the designer in visual studio, but not when the code is run. To resolve this remove the
Main_Load
method and place its contents in the defaultMain
constructor like so in theMain.cs
file.Then remove the line
From the
Main.Designer.cs
file