简体   繁体   English

在WinForms中隐藏和显示选项卡栏

[英]Hiding and showing tab bar in WinForms

I'm looking to create a setup form for my application - and I wanted to use a tab form to keep my logic on the one form since it's very simple rather than many of them. 我正在为我的应用程序创建一个安装表单-我想使用一个选项卡表单将我的逻辑保持在一个表单上,因为它很简单,而不是很多。 Is there a way to remove the tab navigation UI up top and allow me to only progress it programatically? 有没有一种方法可以删除顶部的标签导航UI,并只允许我以编程方式对其进行处理?

Look at user controls. 查看用户控件。 They cover pretty much what you want. 他们几乎涵盖了您想要的一切。

Just create a user control for each view. 只需为每个视图创建一个用户控件。 It only consists of the controls you want to have on each tab page anyway. 无论如何,它仅包含要在每个选项卡页面上具有的控件。 Then you can hide/show the user control you want and you do not have a full blown form for each view. 然后,您可以隐藏/显示所需的用户控件,并且每个视图都没有完整的窗体。

Look at this tutorial: http://msdn.microsoft.com/en-us/library/a6h7e207%28v=vs.71%29.aspx 查看本教程: http : //msdn.microsoft.com/zh-cn/library/a6h7e207%28v=vs.71%29.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM