I decided to change a utility I'm working on to use a tabpage. When I tried to drag various controls from the form to a tab page on top of the form, it made copies of the control, giving it a different name. It's easy enough to just remake the form on top of the tab or just edit the source code in the designer to have everything be added to the tab instead (and this is what I did, which worked), but it seems like there would probably be a better way to do this via the gui.
我决定更改一个我正在使用的工具来使用标签页。当我尝试将各种控件从表单拖到表单顶部的标签页时,它会创建控件的副本,为其指定一个不同的名称。只需在选项卡顶部重新创建表单或者只是编辑设计器中的源代码就可以将所有内容添加到选项卡中(这就是我所做的,哪个有效),但似乎很可能通过gui做一个更好的方法。
3 个解决方案
#1
Have you tried cut and paste. That usually works for me.
你有没有尝试剪切和粘贴。这通常对我有用。
#2
The correct tool for this is the Document Outline (CTRL+W, U). Simply drag your set of controls in the outline so that they are under the tab page. Voila.
对此的正确工具是文档大纲(CTRL + W,U)。只需在轮廓中拖动控件集,使它们位于选项卡页面下。瞧。
The document outline dramatically simplifies these types of operations, especially when you are dealing with complex layouts.
文档大纲大大简化了这些类型的操作,尤其是在处理复杂布局时。
#3
Your control key is stuck. Do not press control key when dragging controls.
你的控制键卡住了。拖动控件时不要按控制键。
I drag controls from form control to tab page controls all the time no problem. Answer #1 is totally correct.
我将控件从表单控件拖到标签页控件一直没有问题。答案#1是完全正确的。
You can use the Document Outline window and move the controls to the tab page one by one by dragging tree nodes.
您可以使用“文档大纲”窗口,通过拖动树节点将控件逐个移动到选项卡页面。
The hardest problem is retaining control locations on the tab page.
最难的问题是在标签页上保留控制位置。
#1
Have you tried cut and paste. That usually works for me.
你有没有尝试剪切和粘贴。这通常对我有用。
#2
The correct tool for this is the Document Outline (CTRL+W, U). Simply drag your set of controls in the outline so that they are under the tab page. Voila.
对此的正确工具是文档大纲(CTRL + W,U)。只需在轮廓中拖动控件集,使它们位于选项卡页面下。瞧。
The document outline dramatically simplifies these types of operations, especially when you are dealing with complex layouts.
文档大纲大大简化了这些类型的操作,尤其是在处理复杂布局时。
#3
Your control key is stuck. Do not press control key when dragging controls.
你的控制键卡住了。拖动控件时不要按控制键。
I drag controls from form control to tab page controls all the time no problem. Answer #1 is totally correct.
我将控件从表单控件拖到标签页控件一直没有问题。答案#1是完全正确的。
You can use the Document Outline window and move the controls to the tab page one by one by dragging tree nodes.
您可以使用“文档大纲”窗口,通过拖动树节点将控件逐个移动到选项卡页面。
The hardest problem is retaining control locations on the tab page.
最难的问题是在标签页上保留控制位置。