简体   繁体   English

在设计视图上更改tabcontrol的选项卡项

[英]Changing tab item of tabcontrol on design view

I'm trying to add control to another TabItem on design view, but I can only see the first TabItem with all the controls I previously added and at the moment I can only add controls by hard coding on code view window, therefore I have to compile the program in order to see the results of the controls added by hard coding. 我正在尝试将控件添加到设计视图中的另一个TabItem ,但我只能看到第一个带有我之前添加的所有控件的TabItem ,目前我只能通过代码视图窗口上的硬编码添加控件,因此我必须编译程序以查看硬编码添加的控件的结果。

Any help would be appreciated. 任何帮助,将不胜感激。

I ran into an issue recently that sounds like this, basically the designer isn't recognizing that you've selected something other than the first tab. 我最近遇到了一个问题,听起来像是这样,基本上设计师没有意识到你选择的东西不是第一个标签。 If you go to the properties dialog for that tabitem control and set the IsSelected property to True it should display that tabs content area. 如果转到该tabitem控件的属性对话框并将IsSelected属性设置为True,则应显示该选项卡内容区域。

However, I suspect that the real problem is that you don't have VS2008 SP1 installed since they fixed it with that update. 但是,我怀疑真正的问题是你没有安装VS2008 SP1,因为他们用该更新修复了它。 Unfortunately Windows Update doesn't tell you that SP1 exists, not even VS2008's menu "Help>Check for Updates" tells you it's available. 不幸的是,Windows Update并没有告诉您SP1存在,甚至VS2008的菜单“帮助>检查更新”都没有告诉您它可用。 You'll have to go to; 你必须去;

http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en

to get it yourself. 自己动手吧。 After it's installed the Tab Control works the way you'd expect it to work. 安装完成后,Tab Control按照您期望的方式工作。

PS: Don't forget the 3 security updates to SP1, all 500MB of them. PS:不要忘记SP1的3个安全更新,全部500MB。 Windows Update finds them just fine. Windows Update发现它们很好。

As SnOrfus says, apparently it may create some conflict when you start doing some hard coding although it is uncommon thing what happen to you as I can work on the design view creating tab control, tab items and manipulating trough the design view. 正如SnOrfus所说,显然当你开始做一些硬编码时可能会产生一些冲突,尽管你在设计视图创建标签控件,标签项和通过设计视图操作时可能会发生什么事情并不常见。

My recommendation would be, 1.- Check if you have install the later Service Pack for Visual Studio. 我的建议是,1。 - 检查您是否安装了以后的Visual Studio Service Pack。 (Check for updates for VS2008) 2.- Start over your design from fresh, working only on design view. (检查VS2008的更新)2。 - 从新设计开始,仅在设计视图上工作。 3.- Try to use "Wrappanel" or "stackPanel" instead of canvas or grid inside of tabitem ( that will help you with the layout). 3.-尝试在tabitem中使用“Wrappanel”或“stackPanel”而不是画布或网格(这将有助于您进行布局)。

If you use WrapPanel you may need to look at the behaviour of scrolling and wrapping its content. 如果您使用WrapPanel,则可能需要查看滚动和包装其内容的行为。

Hope this helps. 希望这可以帮助。

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

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