Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Tab order in MFC dialog with CTabCtrl

Tab order in MFC dialog with CTabCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++help
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    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.

    A D 2 Replies Last reply
    0
    • L Lost User

      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.

      A Offline
      A Offline
      Anand Todkar
      wrote on last edited by
      #2

      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.

      L 1 Reply Last reply
      0
      • A Anand Todkar

        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.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Hello Anand, I know that I can edit the tab order in resource editor and I have done it already for this example. The question was if the user would expect 1) or 2) as the result. Andreas.

        1 Reply Last reply
        0
        • L Lost User

          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.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          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

          L 1 Reply Last reply
          0
          • D David Crow

            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

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5
            1. Is confusing for the user if more than one/two/three controls are behind the tab control in tab order. Andreas.
            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups