Tab Orders (Child Controls)

This is a discussion on Tab Orders (Child Controls) within the Windows Programming forums, part of the Platform Specific Boards category; Hi, I cannot seem to find any info on how to set the tab orders of child controls in a ...

  1. #1
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339

    Tab Orders (Child Controls)

    Hi,

    I cannot seem to find any info on how to set the tab orders of child controls in a standard window (not a dialog). Any ideas on how to approach it?

    Thanks
    Jack
    TNT
    You Can Stop Me, But You Cant Stop Us All

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,263
    Have a butchers at GetNextDlgTabItem, particularly the Remarks section where it says that controls are usually traversed in order of creation.

    Changing that would require capturing TAB keyboard messages and overriding the default behaviour. Or you can just change the order in which you create your controls (move things around in your code/resource files).

  3. #3
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970
    You can use SetWindowPos to change the z-order of windows, which determines their tab order.

  4. #4
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    related question:
    I have setup and created my controls in my main window, but they absolutely refuse to be tabbed through!! I have set all of them with the WS_TABSTOP property. Do I have to catch tab commands and manually advance focus to the next control?? Or is it automated in some other way that I am missing?

  5. #5
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970

  6. #6
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    Quote Originally Posted by Dante Shamest
    Thanks, that helped greatly!

  7. #7
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    The search has timed out so you have probably already seen this, but just in case:
    Using the TAB key to navigate in non-dialogs

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  2. process programming
    By St0rM-MaN in forum Linux Programming
    Replies: 2
    Last Post: 09-15-2007, 07:53 AM
  3. Tab Ordering of GUI Controls
    By cloudy in forum Windows Programming
    Replies: 2
    Last Post: 04-22-2006, 09:13 AM
  4. Using the VS.NET form designer with tab controls
    By bennyandthejets in forum Windows Programming
    Replies: 1
    Last Post: 07-06-2004, 12:49 AM
  5. Tab controls - MFC (revived)
    By Robert602 in forum Windows Programming
    Replies: 1
    Last Post: 01-22-2002, 11:32 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21