简体   繁体   中英

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:

在此处输入图片说明

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:

在此处输入图片说明

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). 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.

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.

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.

The above trick will allow you to easily swap the two controls as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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