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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Changing Tab Order Programmatically

Changing Tab Order Programmatically

Scheduled Pinned Locked Moved C / C++ / MFC
7 Posts 4 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.
  • B Offline
    B Offline
    BiswaR
    wrote on last edited by
    #1

    Hi Guys, Is there any way to change the tab orders for a controls programmatically.

    J K 2 Replies Last reply
    0
    • B BiswaR

      Hi Guys, Is there any way to change the tab orders for a controls programmatically.

      J Offline
      J Offline
      Jack Puppy
      wrote on last edited by
      #2

      SetWindowPos Use wndTop for the first control, and the previous window for the remaining. "My dog worries about the economy. Alpo is up to 99 cents a can. That's almost seven dollars in dog money" - Wacky humour found in a business magazine

      1 Reply Last reply
      0
      • B BiswaR

        Hi Guys, Is there any way to change the tab orders for a controls programmatically.

        K Offline
        K Offline
        khan
        wrote on last edited by
        #3

        I think you could try this: 1- Destroy all the controls you want to set the tab-order of. 2- Create them again in the order in which you would like the tab-order. this is this.

        B 1 Reply Last reply
        0
        • K khan

          I think you could try this: 1- Destroy all the controls you want to set the tab-order of. 2- Create them again in the order in which you would like the tab-order. this is this.

          B Offline
          B Offline
          Blake Miller
          wrote on last edited by
          #4

          NO!!!!!!!!!!!!!!!! :omg: :omg: :omg: Use SetWindowPos to change the Z-Order - TAB order int he dialog merely follows the controls' Z-Order. People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks

          K 1 Reply Last reply
          0
          • B Blake Miller

            NO!!!!!!!!!!!!!!!! :omg: :omg: :omg: Use SetWindowPos to change the Z-Order - TAB order int he dialog merely follows the controls' Z-Order. People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks

            K Offline
            K Offline
            khan
            wrote on last edited by
            #5

            You have probably tested this technique, and I haven't tested my ideas, so I guess you are right. Thanks for the correction. this is this.

            B 1 Reply Last reply
            0
            • K khan

              You have probably tested this technique, and I haven't tested my ideas, so I guess you are right. Thanks for the correction. this is this.

              B Offline
              B Offline
              Blake Miller
              wrote on last edited by
              #6

              Yes, it works well. When you create a control on the fly, you can also use SetWindowPos to 'insert' it into a specific tab order. You method will work, it is just overkill. People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks

              K 1 Reply Last reply
              0
              • B Blake Miller

                Yes, it works well. When you create a control on the fly, you can also use SetWindowPos to 'insert' it into a specific tab order. You method will work, it is just overkill. People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks

                K Offline
                K Offline
                khan
                wrote on last edited by
                #7

                Yes, I also tested my idea yesterday, and it works. But as you said, it is just overkill. SetWindowPos() is much easier and simpler. this is this.

                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