How to control the tab order in dialog with a tab control?

How to control the tab order in dialog with a tab control?

Post by Eric » Fri, 04 Sep 1998 04:00:00



I have a dialog which has a tab control and several other controls -- some
buttons and edit boxes.  A couple of the edit boxes are above the tab
control and a couple are below it.  The problem I have is with the tabbing
order.  When you tab through the controls in the dialog, the focus first
goes through the other controls in the dialog (the ones above and below
the tab control) and then the controls inside the tab control -- even
though the tab control is in the proper position in the dialog template.

I think what's happening is probably because the controls inside the tab
control in a dialog which is a child of the main dialog.  (I believe
that's the recommended way of doing it).  But it's very confusing for the
user for the tab order to work this way.

Is there an easy way of fixing this problem?  I know I could subclass the
appropriate controls in the dialog and handle the tab key myself, but I'd
prefer a more global solution (I have several dialogs like this).

I suspect that using property sheets would solve my problem, but switching
to property sheets isn't really practical for me.

Thanks for any assistance.
- Eric S.

 
 
 

How to control the tab order in dialog with a tab control?

Post by Tomas Restrep » Fri, 04 Sep 1998 04:00:00


Are you sure you're setting tab order correctly? By default, the tabbing
order is the order of creation of the controls, but you can change it by
pressing Ctrl-D, and clicking each control to set the order.

--
Tomas Restrepo

http://www.geocities.com/SiliconValley/Heights/3401


>I have a dialog which has a tab control and several other controls -- some
>buttons and edit boxes.  A couple of the edit boxes are above the tab
>control and a couple are below it.  The problem I have is with the tabbing
>order.  When you tab through the controls in the dialog, the focus first
>goes through the other controls in the dialog (the ones above and below
>the tab control) and then the controls inside the tab control -- even
>though the tab control is in the proper position in the dialog template.

>I think what's happening is probably because the controls inside the tab
>control in a dialog which is a child of the main dialog.  (I believe
>that's the recommended way of doing it).  But it's very confusing for the
>user for the tab order to work this way.

>Is there an easy way of fixing this problem?  I know I could subclass the
>appropriate controls in the dialog and handle the tab key myself, but I'd
>prefer a more global solution (I have several dialogs like this).

>I suspect that using property sheets would solve my problem, but switching
>to property sheets isn't really practical for me.

>Thanks for any assistance.
>- Eric S.


 
 
 

How to control the tab order in dialog with a tab control?

Post by Eric » Sat, 05 Sep 1998 04:00:00


Yes, my tab order is set correctly.  I can tell because the focus is actually moving
like this:
1. Controls above the tab control
2. The tab thingy on the tab control
3. Controls below the tab control
4. Controls inside the tab control

- Eric S.


says...

>Are you sure you're setting tab order correctly? By default, the tabbing
>order is the order of creation of the controls, but you can change it by
>pressing Ctrl-D, and clicking each control to set the order.

>--
>Tomas Restrepo

>http://www.geocities.com/SiliconValley/Heights/3401


>>I have a dialog which has a tab control and several other controls -- some
>>buttons and edit boxes.  A couple of the edit boxes are above the tab
>>control and a couple are below it.  The problem I have is with the tabbing
>>order.  When you tab through the controls in the dialog, the focus first
>>goes through the other controls in the dialog (the ones above and below
>>the tab control) and then the controls inside the tab control -- even
>>though the tab control is in the proper position in the dialog template.

>>I think what's happening is probably because the controls inside the tab
>>control in a dialog which is a child of the main dialog.  (I believe
>>that's the recommended way of doing it).  But it's very confusing for the
>>user for the tab order to work this way.

>>Is there an easy way of fixing this problem?  I know I could subclass the
>>appropriate controls in the dialog and handle the tab key myself, but I'd
>>prefer a more global solution (I have several dialogs like this).

>>I suspect that using property sheets would solve my problem, but switching
>>to property sheets isn't really practical for me.

>>Thanks for any assistance.
>>- Eric S.

 
 
 

How to control the tab order in dialog with a tab control?

Post by Tomas Restrep » Sat, 05 Sep 1998 04:00:00


So you say that you set tab order correctly, but it works different when the
dialog's shown, or am I misunderstanding you?

--
Tomas Restrepo

http://www.geocities.com/SiliconValley/Heights/3401


>Yes, my tab order is set correctly.  I can tell because the focus is
actually moving
>like this:
>1. Controls above the tab control
>2. The tab thingy on the tab control
>3. Controls below the tab control
>4. Controls inside the tab control

>- Eric S.

 
 
 

How to control the tab order in dialog with a tab control?

Post by Brad Bernhard » Wed, 16 Sep 1998 04:00:00


Have you gone to the 'Tab Order' option under the Layout menu?

-Brad Bernhardt

 
 
 

1. Tab order with a tab control

Hello,

I have been having problems getting the TAB key to work correctly with
my dialog box.  The dialog box contains a tab control.  The tab control
creates a child dialog box for each tab.  The tab key works correctly
for the main dialog box controls.  And if I click on a control on one of
the child dialog boxes, that works correctly.  However, I can't use the
TAB key to move between the two dialog boxes.  I'm not using MFC so
please don't provide any answers involving that.  It will just confuse
me more.

By the way, I have the DS_CONTROL and WS_CHILD styles set for the child
dialog boxes.

Thanks in advance.

--
__________________________________________________
Christopher Smith          (Direct) (408) 737-6160
Technical Staff              (Main) (408) 738-5390
EOO, Inc.                     (Fax) (408) 738-5399


2. SN#10136 James Gosling and Others Showcase Variety of Uses of Java[TM] Technology

3. Tab navigation between a tab control and the displayed controls

4. advice on debugging sportster needed

5. Ctrl-tab and tab control in a dialog

6. Job Opportunity-Software Config Mgmt Expert. Nokia Research Center- Helsinki

7. Tab sequence in dialogs with tab controls

8. How to dynamically set the tab order of dialog controls

9. Getting tab order for a dialog control

10. Help finding tab order of dialog control?

11. Tabbing in the tab common control

12. Article: Implementing drag 'n drop tab sorting in a tab control