winforms 设计器行为问题(当尝试对其进行控制时,选项卡会自动更改)

发布于 2024-12-08 21:03:35 字数 534 浏览 3 评论 0原文

对比2010年 我有简单的 win 表单,没有代码,只有 3 个页面的选项卡,每个选项卡页上都有按钮。

当我尝试将按钮放在标签页上时(在页面左侧,它工作正常,如果我尝试将 btn 放在页面右侧......设计器会自动将标签页更改为另一个标签页,

也许问题出在这段代码中

  this.tabControl1.SuspendLayout();
   this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
 this.groupBox8.ResumeLayout(false);
  this.groupBox8.PerformLayout();
   ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();

)我从我的一个选项卡(始终自动选择)中删除所有控件,并且设计器工作正常 后来我删除了矩形控件(它们来自 Visual basic power pack,现在设计器工作正常)

VS 2010
I have simple win forms without code, just tab with 3 pages and buttons on each tabpage.

When i trying to put button on tabpage (on the left side of page it works fine, if i trying to put btn on right side of the page ...the designer will automatically change tabpage to another

Maybe problems is in this code

  this.tabControl1.SuspendLayout();
   this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
 this.groupBox8.ResumeLayout(false);
  this.groupBox8.PerformLayout();
   ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();

P.S. When i delete all controls from one my tab(which always selected automatically) and designer work fine
Later i delete rectangle controls(they are from Visual basic power pack and now designer works fine)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

穿越时光隧道 2024-12-15 21:03:35

当我从页面选项卡中删除 Visual Basic power pack 矩形控件时,问题得到解决。这个控件在 vs 2010 中有 bug

Problem solved wheni deleted Visual Basic power pack rectangle controls from my page tab. This control have bug in vs 2010

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文