Visual Studio 2010 中的控制选项卡顺序 [英] Control Tab Order in Visual Studio 2010

查看:30
本文介绍了Visual Studio 2010 中的控制选项卡顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种简单的方法可以在 Visual Studio 表单设计器中更改复杂表单上控件的 Tab 键顺序.

Is there an easy way of changing the tab order of controls on a complicated form in the Visual Studio forms designer.

我知道我可以选择 Tab Order 模式,它会向我显示所有带有 Tab 索引的控件,但是在复杂的表单中间添加一个新控件并且必须重新选择每个控件是非常痛苦的再次设置表单以设置新的 Tab 键顺序.我经常发现我不小心错过了一个控件,所以不得不重新做一遍.

I know that I can select the Tab Order mode and it shows me all the controls with their tab index, but it is such a pain to add a new control in the middle of a complicated form and have to reselect EVERY control on the form again to set the new tab order. I often find that I have accidentally missed a control and so have to do it all over again.

我在 MSDN 上读到,至少应该可以在要开始新控件重新排序的位置之前按 Ctrl-单击控件,然后单击每个控件以设置新的选项卡顺序,但是我不能让它工作.按住 Ctrl 键单击前一个控件只是将该控件设置为 Tab 索引 0,这样它就成为整个表单上新的第一个控件.

I read on MSDN that it should at least be possible to Ctrl-Click on the control previous to where I want to start the new control reordering and then click on each contol after that to set the new the tab order, but I can't get that to work. Ctrl-Clicking the previous control just sets that one to Tab Index 0 and so that becames the new first control on the whole form.

我来自 delphi 背景,在 delphi 中编辑控件选项卡顺序时,您会看到一个对话框,其中显示了表单上所有控件的列表,您可以从列表中选择一个控件并将其在列表中向上或向下移动.对于简单的更改(例如交换 Tab 键顺序或在表单中间添加新控件)来说要容易得多.也许我遗漏了一些东西,而且很容易做到这一点.如果 Visual Studio 中不可用,是否有模拟 delphi 功能的插件.

I come from a delphi background and in delphi when editing the control tab order you get a dialog showing a list of all the controls on the form and you can select a control from the list and move it up or down the list. Much easier for a simple change like swapping tab order or adding a new control in to the middle of a form. Perhaps I am missing something, and it is possible to do this easily. If not available in Visual studio is there an add in that mimics the delphi functionality.

问候布莱恩

推荐答案

如果添加一个新控件并为其指定一个使用的 Tab 键顺序值,Visual Studio 将自动替换其余控件.两个控件将具有相同的 Tab 键顺序,但可以正常工作.

If you add a new control and give it a tab order value that is used, Visual Studio will automatically replace the rest. Both controls will have the same tab order, but it will work.

这篇关于Visual Studio 2010 中的控制选项卡顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆