Sizing issues while adding a .Net UserControl to a TabPage

拥有回忆 提交于 2019-12-01 18:08:26

The UserControl's "AutoScaleMode" property should be set to "None".

If you want the customView to fill the TabPage.

Use Dock like this:

tempTabPage.Controls.Add(customView);
customView.Dock = DockStyle.Fill;

Then the customView will fill out the space in the TabPage, but you have to handle resizing of the customView so child controls will be shown properly.

I had the same issue. The UserControl's "AutoScaleMode" set to "None" works for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!