Tab order in MFC dialog with CTabCtrl
-
Hello, I have a question about the tab order in a MFC dialog with a CTabCtrl or CPropertySheet with some tab pages and controls on the pages and some other controls at top and at bottom in the main dialog. The layout of the main dialog is: ----------------------- Button1 Button2 Button3 CTabCtrl or Sheet with Page1, Page2, Page3 Button4 Button5 Button6 ----------------------- I would expect that the tab order is (active Page is Page1): 1) Button1 -> Button2 -> Button3 -> Tab of Page1 -> All controls of Page1 -> Button4 -> Button5 -> Button6 But the tab order is: 2) Button1 -> Button2 -> Button3 -> Button4 -> Button5 -> Button6 -> All controls of Page1 -> Tab of Page1 Should it be 1) or 2) and why? Thanks for your help, Andreas.
-
Hello, I have a question about the tab order in a MFC dialog with a CTabCtrl or CPropertySheet with some tab pages and controls on the pages and some other controls at top and at bottom in the main dialog. The layout of the main dialog is: ----------------------- Button1 Button2 Button3 CTabCtrl or Sheet with Page1, Page2, Page3 Button4 Button5 Button6 ----------------------- I would expect that the tab order is (active Page is Page1): 1) Button1 -> Button2 -> Button3 -> Tab of Page1 -> All controls of Page1 -> Button4 -> Button5 -> Button6 But the tab order is: 2) Button1 -> Button2 -> Button3 -> Button4 -> Button5 -> Button6 -> All controls of Page1 -> Tab of Page1 Should it be 1) or 2) and why? Thanks for your help, Andreas.
Andreas, You can hold Ctrl+D and you will see the tab order of all controls with their numbers. Now to modify it, click on control on which you want a tab to start at first, now go on clicking on controls as per your need and the tab order will get set for you. Alternately, you can also modify the .rc file of your application to set the tab order but that is a tricky and dangereous way of doing it. Better to follow the first approach and the Visual Studio will make things for you. :)
Thanks, Anand.
-
Andreas, You can hold Ctrl+D and you will see the tab order of all controls with their numbers. Now to modify it, click on control on which you want a tab to start at first, now go on clicking on controls as per your need and the tab order will get set for you. Alternately, you can also modify the .rc file of your application to set the tab order but that is a tricky and dangereous way of doing it. Better to follow the first approach and the Visual Studio will make things for you. :)
Thanks, Anand.
-
Hello, I have a question about the tab order in a MFC dialog with a CTabCtrl or CPropertySheet with some tab pages and controls on the pages and some other controls at top and at bottom in the main dialog. The layout of the main dialog is: ----------------------- Button1 Button2 Button3 CTabCtrl or Sheet with Page1, Page2, Page3 Button4 Button5 Button6 ----------------------- I would expect that the tab order is (active Page is Page1): 1) Button1 -> Button2 -> Button3 -> Tab of Page1 -> All controls of Page1 -> Button4 -> Button5 -> Button6 But the tab order is: 2) Button1 -> Button2 -> Button3 -> Button4 -> Button5 -> Button6 -> All controls of Page1 -> Tab of Page1 Should it be 1) or 2) and why? Thanks for your help, Andreas.
C++ Hacker wrote:
Should it be 1) or 2) and why?
I would expect #2. I've seen other apps do this so I am already familar with it.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
C++ Hacker wrote:
Should it be 1) or 2) and why?
I would expect #2. I've seen other apps do this so I am already familar with it.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius