开发者

c# tabcontrol - tabpage

I am trying to add a tab page programmatically to a ta开发者_JAVA百科bcontrol.

I can do this no problem, but it seems when I add it, it is automatically sized to only 200px in width, and I cannot work out how to resize it. The tabpage is created in a dll, and is returned to the main client whereby it is added to the tabcontrol, but as I say when it is added it is only 200px wide, and any further controls I add onto that tabpage will not show if positioned more than 200px wide.

Any ideas?

Thanks.


Either change the Size property

myTabControl.Size = new System.Drawing.Size(400, 400);

or the Height / Width properties

myTabControl.Height = 400;
myTabControl.Width = 400;

or the Dock property

// Size the tab control to take up all available space in parent container
myTabControl.Dock = DockStyle.Fill;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜