我已经创建了一个在UserControl中添加的TabPage。
Tabpage.AutoScroll = true;
启动应用程序后,只有垂直滚动条。当我调整应用程序的水平大小时,没有滚动条。
Tabcontrol-> TabPage -> UserControl
// tabPage
//
this.tab_resume_new.Controls.Add(this.userControlResume);
this.tab_resume_new.Location = new System.Drawing.Point(4, 29);
this.tab_resume_new.Name = "tabPage";
this.tab_resume_new.Size = new System.Drawing.Size(1270, 635);
在UserControl中
// UserControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoScroll = true;
this.Controls.Add(this.tableLayoutPanel8);
this.Name = "UserControlResume";
this.Size = new System.Drawing.Size(1260, 625)
发布于 2014-03-10 09:51:45
在这种情况下,通常只有几件事情会出错。
1)你需要把AutoScroll放在你的UserControl上
2) tablPage上的控件将锚设置为右。如果您有正确的,那么水平滚动条将不会显示。
3)您有嵌套控件和tabPage中的包装器控件。该包装器控件不超过选项卡页界限。
发布于 2014-03-10 10:30:33
通过为窗体设置MinimumSize
,当您缩小小于MinimumSize的大小时,它将自动插入滚动。
https://stackoverflow.com/questions/22296563
复制相似问题