简体   繁体   English

VS2017 是否允许在 C++ 项目的可视化对话框编辑器中更改控件的 Tab 键顺序?

[英]Does VS2017 allow to change tab order of controls in a visual dialog editor for C++ project?

Say, if I have some dialog box opened in Visual Studio 2017 in the visual editor:假设我在 Visual Studio 2017 的可视化编辑器中打开了一些对话框:

在此处输入图片说明

If I want to rearrange the tab order of these controls, the method I was using was to open the .rc file in a text editor and rearrange control definitions there:如果我想重新排列这些控件的tab order ,我使用的方法是在文本编辑器中打开.rc文件并在那里重新排列控件定义:

在此处输入图片说明

So now I'm wondering if there's a way to do this via visual editor?所以现在我想知道是否有办法通过可视化编辑器来做到这一点?

PS.附注。 I found that the "Layout" toolbar has the "Tab order" button:我发现“布局”工具栏有“标签顺序”按钮:

在此处输入图片说明

but it's always grayed out.但它总是变灰。

You want "Tab Order" on the "Format" menu (possibly has a Ctrl-D shortcut). 您需要“格式”菜单上的“制表顺序”(可能具有Ctrl-D快捷键)。 Then just click the controls in the tab order you want. 然后,只需按所需的标签顺序单击控件即可。

Since I cannot add a comment to previous post, I'm posting this as answer.由于我无法在以前的帖子中添加评论,因此我将此作为答案发布。

Yes, Ctrl+D in the dialog resource editor will turn on tab order (z-order) editing and you can click on each blue number label to change the order from the beginning.是的,对话框资源编辑器中的Ctrl+D将打开 Tab 键顺序(z 顺序)编辑,您可以单击每个蓝色数字标签从头开始更改顺序。

To start renumbering from a specific control, hold Ctrl or Shift (used to be Ctrl+Shift in older VS) then click on that control's blue label, release the keys and click on the next control that should follow in Tab order.要从特定控件开始重新编号,请按住CtrlShift (在较旧的 VS 中曾经是Ctrl+Shift ),然后单击该控件的蓝色标签,松开按键并单击按 Tab 键顺序排列的下一个控件。

Say for example you want to make sure a spin control follows its edit box in tab order (for Auto Buddy assignment), hold Ctrl and click on that edit box, release Ctrl and click on spin.例如,假设您要确保旋转控件按 Tab 键顺序跟随其编辑框(用于自动好友分配),按住 Ctrl 并单击该编辑框,松开 Ctrl 并单击旋转。

The above trick will allow you to easily swap the two controls as well.上述技巧还可以让您轻松交换两个控件。

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

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