(re)ordering tab pages on ssTab control - I'm getting worried

(re)ordering tab pages on ssTab control - I'm getting worried

Post by Darry » Sun, 03 Mar 2002 11:09:19



I set up an ssTab control with 8 tab pages, and after spending considerable
time adding items to each page, aligning controls, etc., I wanted to reorder
the tabs.  Well, I can't seem to figure out how to do it.

In MS Access, each tab on a tab control has a "tabIndex" property that can
be set; the other tabs are then automatically renumbered and displayed in
the new order.  But when you change the "Tab" number in ssTab, it just moves
focus to that tab - it doesn't actually change their index (and thus their
display order).

Please tell me this can be done!  If not, is there another tab control I can
try?

Thanks,
Darryl

 
 
 

(re)ordering tab pages on ssTab control - I'm getting worried

Post by Darry » Sun, 03 Mar 2002 14:29:24


...and in addition to not being able to change the order of the tabs after
they're created, you apparently cannot programmatically show or hide
individual tabs on the ssTab control?!?!!

What kind of &%#*% tab control is this?


Quote:> I set up an ssTab control with 8 tab pages, and after spending
considerable
> time adding items to each page, aligning controls, etc., I wanted to
reorder
> the tabs.  Well, I can't seem to figure out how to do it.

> In MS Access, each tab on a tab control has a "tabIndex" property that can
> be set; the other tabs are then automatically renumbered and displayed in
> the new order.  But when you change the "Tab" number in ssTab, it just
moves
> focus to that tab - it doesn't actually change their index (and thus their
> display order).

> Please tell me this can be done!  If not, is there another tab control I
can
> try?

> Thanks,
> Darryl


 
 
 

(re)ordering tab pages on ssTab control - I'm getting worried

Post by J Fren » Sun, 03 Mar 2002 19:25:51


IMO the ssTab is not really desirable.

The basic MS one is also pretty ghastly

One is better off placing controls on
Frames/Pictureboxes/Usercontrols and activating the right one in
response to a Tab Change.

The following is ETABSIM.CTL  - it simply paints the top tabs you then
show the relevant page yourself.

============ SAVE AS ETABSIM.CTL ============

VERSION 5.00
Begin VB.UserControl ETabs
   AutoRedraw      =   -1  'True
   CanGetFocus     =   0   'False
   ClientHeight    =   930
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4800
   FillStyle       =   0  'Solid
   FontTransparent =   0   'False
   KeyPreview      =   -1  'True
   ScaleHeight     =   930
   ScaleWidth      =   4800
   ToolboxBitmap   =   "ETabSim.ctx":0000
End
Attribute VB_Name = "ETabs"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

'
' Note: AutoRedraw should be set to True to reduce flicker
'       As yet changing ForeColor requires a Refresh (?!?) 3/11/00
' 30/11/00 - Design Mode - Always Refresh
' 17/1/01  - Autoredraw Off on Initialize, On in first Refresh
'            Note: Refresh is only called from Outside

Public Event OnTabChange(TabNo As Integer)
Public Event OnTabRequestChange(NewTabNo As Integer, Refused As
Boolean)
Dim mTabCount%, _
    mCurrentTab%, _
    mTabCaption$(), _
    mBaseRatio As Integer, _
    mBackColor As OLE_COLOR, _
    mForeColor As OLE_COLOR, _
    mHighlightColor As OLE_COLOR, _
    mRefreshOffFlag As Boolean

Dim cmnTopSpace&, _
    cmnBaseTop&, _
    cmnTabLeft&(), _
    cmnTabRight&()

Dim cmnReadingPropertiesFlag As Boolean

Dim Highlight

' ##################################################
'
'   Initialize
'
' ##################################################
Private Sub UserControl_Initialize()
    mTabCount = 2
    mBaseRatio = 50
    mBackColor = vbButtonFace
    mForeColor = vbButtonText
    mHighlightColor = vbHighlight
    Autoredraw = False  ' Get Paint Events
    ReDim Preserve mTabCaption$(mTabCount)
    ReDim cmnTabRight(mTabCount)
End Sub

' ##################################################
'
'   Properties
'
' ##################################################

' ##################################################
'
Property Let TabCount(Value As Integer)

    If Value > mTabCount Then
       ReDim Preserve mTabCaption(Value)
    End If
    If mTabCount = Value Then Exit Property
    mTabCount = Value
    ' --- If Reducing Tabs then Deselect if invalid
    If mCurrentTab > mTabCount Then
       mCurrentTab = 0
    End If
    ' ---
    Call LS_Refresh
    PropertyChanged "TabCount"
End Property

Property Get TabCount() As Integer
    TabCount = mTabCount
End Property

' ##################################################
'
Property Let CurrentTab(Value As Integer)

    If LF_BadTabNo("Set CurrentTab", 0, Value) Then
      Exit Property
    End If
    ' ---
    Call LS_ChangeTab(Value)
End Property

Property Get CurrentTab() As Integer
    CurrentTab = mCurrentTab
End Property

'
' --- TabCaption
'
Property Let TabCaption(TabNo%, Value$)

    If LF_BadTabNo("Set TabCaption", 1, TabNo) Then Exit Property
    mTabCaption(TabNo) = Value$
    Call LS_Refresh
End Property

Property Get TabCaption(TabNo%) As String
    If LF_BadTabNo("Get TabCaption", 1, TabNo) Then Exit Property
    TabCaption = mTabCaption(TabNo)
End Property

'
' --- Ratio - Tabs to Base Box
'
Property Let BaseRatio(ByVal Value As Integer)

    If Value < 0 Then Value = 0
    If Value > 100 Then Value = 100
    If mBaseRatio = Value Then Exit Property

    mBaseRatio = Value
    Call LS_Refresh
    PropertyChanged "BaseRatio"
End Property

Property Get BaseRatio() As Integer
    BaseRatio = mBaseRatio
End Property

Public Property Get Font() As StdFont
    Set Font = UserControl.Font
End Property

Public Property Set Font(F As StdFont)
    Set UserControl.Font = F
    Call LS_Refresh
    PropertyChanged "Font"
End Property

Property Let BackColor(Value As OLE_COLOR)
    mBackColor = Value
    Call LS_Refresh
    PropertyChanged "BackColor"
End Property

Property Get BackColor() As OLE_COLOR
    BackColor = mBackColor
End Property

Property Let ForeColor(Value As OLE_COLOR)
    mForeColor = Value
    Call LS_Refresh
    PropertyChanged "ForeColor"
End Property

Property Get ForeColor() As OLE_COLOR
    ForeColor = mForeColor
End Property

Property Let HighlightColor(Value As OLE_COLOR)
    mHighlightColor = Value
    Call LS_Refresh
    PropertyChanged "HighlightColor"
End Property

Property Get HighlightColor() As OLE_COLOR
    HighlightColor = mHighlightColor
End Property

'
' --- Refresh Off
'
Property Let RefreshOffFlag(Value As Boolean)
    mRefreshOffFlag = Value
End Property
Property Get RefreshOffFlag() As Boolean
    RefreshOffFlag = mRefreshOffFlag
End Property

'
' ---
'

'
' --- Range Check Utility
'
Private Function LF_BadTabNo(Section$, Min%, TabNo%) As Boolean
    If TabNo < Min Or TabNo > mTabCount Then
       MsgBox "ETabSim.ctl - Invalid " + Section$ + Str$(TabNo)
       LF_BadTabNo = True
    End If
End Function

' ##################################################
'
'   Activity
'
' ##################################################

' ##################################################
'
'
'
Private Sub UserControl_MouseUp(Button As Integer, Shift As Integer, X
As Single, Y As Single)
    Dim Q%, L9%

    If Y < cmnTopSpace Then Exit Sub
    If Y > cmnBaseTop Then Exit Sub

    For L9 = 1 To mTabCount
        If X > cmnTabLeft(L9) Then
           If X < cmnTabRight(L9) Then
              Q = L9
              Exit For
           End If
        End If
    Next
    If Q Then
       If Q <> mCurrentTab Then
          Call LS_ChangeTab(Q)
       End If
    End If
End Sub

' ##################################################
'
'   Private Utilities
'
' ##################################################

Private Sub LS_ChangeTab(NewTab%)
    Dim Q%, Refused As Boolean

    Q = NewTab
    RaiseEvent OnTabRequestChange(Q, Refused)
    If Refused Then Exit Sub

    mCurrentTab = NewTab
    Call LS_Refresh
    RaiseEvent OnTabChange(NewTab)
End Sub

Private Sub UserControl_Resize()
    If Width < 255 Then
       Width = 255
    End If
    ' Design Mode - Always Refresh
    If UserControl.Ambient.UserMode = False Then
       Call LS_Refresh
       Exit Sub
    End If
End Sub

Private Sub UserControl_Paint()
    Call LS_Refresh
End Sub

' ##################################################
'
' Draw All Tabs
'
Private Sub LS_Refresh()
    Static InRefresh As Boolean
    Dim L9%, TV&, TH&, BV&, BH&

    If InRefresh Then Exit Sub
    If mRefreshOffFlag Then Exit Sub
    If cmnReadingPropertiesFlag Then Exit Sub

    InRefresh = True

    ReDim cmnTabLeft(mTabCount)
    ReDim cmnTabRight(mTabCount)

    Cls

    ScaleMode = vbPixels
    DrawMode = vbCopyPen
    DrawWidth = 1
    cmnTopSpace = ScaleHeight / 10

    ' --- For the Base Box - %age of Total Height
    TV = ScaleHeight * (100 - mBaseRatio) / 100
    BV = ScaleHeight - 1
    BH = ScaleWidth - 4

    If mBaseRatio > 0 Then
       cmnBaseTop = TV
       Call LS_DrawBase(TV, BV, BH + 3)
    End If

    ' --- Tabs
    For L9 = 1 To mTabCount

        If L9 <> mCurrentTab Then
           Call LS_DrawTab(L9, False, TV, BH)
        End If
    Next
    If mCurrentTab Then
       Call LS_DrawTab(mCurrentTab, True, TV, BH)
    End If

    InRefresh = False

End Sub

' ================================================
'
'  Draw Base of Tabs Control
'
Sub LS_DrawBase(TV&, BV&, BH&)

    ' --- Left Hand White
    Call LineV(0, TV, BV, vbWhite)

    ' --- Top (Mid) Line White
    Call LineH(TV, 0, BH, vbWhite)

    ' --- Right Hand Grey
    Call LineV(BH, TV + 1, BV - 1, vbButtonShadow)

    ' --- Right Hand Black - BV+1 overruns
    Call LineV(BH, TV, BV, vbBlack)

    ' --- Bottom Line Grey
    Call LineH(BV - 1, 1, BH - 1, vbButtonShadow)

    ' --- Bottom Line Black - BH+1 overruns
    Call LineH(BV, 0, BH, vbBlack)

End Sub

' ================================================
'
'  Draw One Tab
'
Private Sub LS_DrawTab(No%, Selected As Boolean, _
                       ByVal BV&, ByVal TotalWidth&)
    Dim W&, H1&, H2&, TV&, S$, V&, H&, Adj&, Q&

    'LW = 4 'PixW  ' Gap between Tabs
    ' ---   2 to Left, 4 to Right
    Adj = 6
    W = TotalWidth
    While W * mTabCount > (TotalWidth - 6)
          W = (TotalWidth - Adj) / mTabCount
          Adj = Adj + 2
    Wend
    ' ---
    H1 = (No - 1) * W + 2
    H2 = H1 + W - 1

    ' --- Remember for later
    cmnTabLeft(No) = H1
    cmnTabRight(No) = H2

    ' ---
    TV = cmnTopSpace

    If Selected Then
       TV = 0
       BV = BV + 1
       H1 = H1 - 2                ' Left a bit
       If No > 1 Then H1 = H1 - 2 ' And more if Tab 1
       H2 = H2 + 3                ' Right a bit
       ' --- Clear Tab Box
       Call Plot(TV, H1 + 1, BV, H2 - 2, BackColor)
    End If

    ' --- Top Line
    Call LineH(TV, H1, H2, vbWhite)

    ' --- Left Hand White
    Call LineV(H1, TV, BV - 1, vbWhite)

    ' --- Right Hand Grey
    Call LineV(H2 - 1, TV + 1, BV - 1, vbButtonShadow)

    ' Black Right Side
    Call LineV(H2, TV, BV - 1, vbBlack)

    ' --- Left Hand White Corner
    Call LineH(TV, H1, H1 + 2, BackColor)
    Call LineH(TV + 1, H1, H1 + 1, BackColor)
    Call LineH(TV + 2, H1, H1, BackColor)

    Call PixSet(TV, H1 + 3, vbWhite)
    Call PixSet(TV + 1, H1 + 2, vbWhite)
    Call PixSet(TV + 2, H1 + 1, vbWhite)

    ' --- Left Hand Corner
    Call LineH(TV, H2 - 1, H2, BackColor)
    Call LineH(TV + 1, H2, H2, BackColor)
    Call PixSet(TV + 1, H2 - 1, vbBlack)

    ' --- Caption
    S$ = mTabCaption(No)
    H = W - 8
    While (TextWidth(S$) > H) And (Len(S$) > 0)
          S$ = Left$(S$, Len(S$) - 1)
    Wend
    H =
...

read more »

 
 
 

(re)ordering tab pages on ssTab control - I'm getting worried

Post by Darry » Mon, 04 Mar 2002 12:17:53


Interesting, Mr. French.  But too much code.  I devised a *much* simpler
solution:

1.  add a second tab control (say ssTabNames) having nothing but tabs and
names on it - in their desired order.  Size the area under the tab to be
very thin.
2.  size and move ssTabNames to the top of ssTabMain.  You can also do it in
code when the form opens:

ssTabNames.left = ssTabMain.left
ssTabNames.width = ssTabMain.width
ssTabNames.top = ssTabMain.top - 50

3. when the form opens, populate a global array of size(# of tabs)
containing the tab name, original position (where it appears on ssTabMain),
and it's new position on ssTabName
4. In the Click event of ssTabNames, add a few lines of code to references
the array and determine which tab on ssTabMain should be shown.  Then show
it.

If you get the sizes and alignment right, it looks and works just about
perfectly.

Ideally, the ssTab control itself should have tabPages you can iterate
through.  Look at the tab control in MS Access97 and up - each tab control
consists of the tab control itself and the tab pages, which are separate
objects you can control programmatically at design and run-time.  If they
can put that control in Access, they can put it in VB (I would guess).

Thanks for the response,
Darryl

"J French" <je...@iss.u-net.com> wrote in message

news:3c80a75c.3181242@news.u-net.com...
> IMO the ssTab is not really desirable.

> The basic MS one is also pretty ghastly

> One is better off placing controls on
> Frames/Pictureboxes/Usercontrols and activating the right one in
> response to a Tab Change.

> The following is ETABSIM.CTL  - it simply paints the top tabs you then
> show the relevant page yourself.

> ============ SAVE AS ETABSIM.CTL ============

> VERSION 5.00
> Begin VB.UserControl ETabs
>    AutoRedraw      =   -1  'True
>    CanGetFocus     =   0   'False
>    ClientHeight    =   930
>    ClientLeft      =   0
>    ClientTop       =   0
>    ClientWidth     =   4800
>    FillStyle       =   0  'Solid
>    FontTransparent =   0   'False
>    KeyPreview      =   -1  'True
>    ScaleHeight     =   930
>    ScaleWidth      =   4800
>    ToolboxBitmap   =   "ETabSim.ctx":0000
> End
> Attribute VB_Name = "ETabs"
> Attribute VB_GlobalNameSpace = False
> Attribute VB_Creatable = True
> Attribute VB_PredeclaredId = False
> Attribute VB_Exposed = False
> Option Explicit

> '
> ' Note: AutoRedraw should be set to True to reduce flicker
> '       As yet changing ForeColor requires a Refresh (?!?) 3/11/00
> ' 30/11/00 - Design Mode - Always Refresh
> ' 17/1/01  - Autoredraw Off on Initialize, On in first Refresh
> '            Note: Refresh is only called from Outside

> Public Event OnTabChange(TabNo As Integer)
> Public Event OnTabRequestChange(NewTabNo As Integer, Refused As
> Boolean)
> Dim mTabCount%, _
>     mCurrentTab%, _
>     mTabCaption$(), _
>     mBaseRatio As Integer, _
>     mBackColor As OLE_COLOR, _
>     mForeColor As OLE_COLOR, _
>     mHighlightColor As OLE_COLOR, _
>     mRefreshOffFlag As Boolean

> Dim cmnTopSpace&, _
>     cmnBaseTop&, _
>     cmnTabLeft&(), _
>     cmnTabRight&()

> Dim cmnReadingPropertiesFlag As Boolean

> Dim Highlight

> ' ##################################################
> '
> '   Initialize
> '
> ' ##################################################
> Private Sub UserControl_Initialize()
>     mTabCount = 2
>     mBaseRatio = 50
>     mBackColor = vbButtonFace
>     mForeColor = vbButtonText
>     mHighlightColor = vbHighlight
>     Autoredraw = False  ' Get Paint Events
>     ReDim Preserve mTabCaption$(mTabCount)
>     ReDim cmnTabRight(mTabCount)
> End Sub

> ' ##################################################
> '
> '   Properties
> '
> ' ##################################################

> ' ##################################################
> '
> Property Let TabCount(Value As Integer)

>     If Value > mTabCount Then
>        ReDim Preserve mTabCaption(Value)
>     End If
>     If mTabCount = Value Then Exit Property
>     mTabCount = Value
>     ' --- If Reducing Tabs then Deselect if invalid
>     If mCurrentTab > mTabCount Then
>        mCurrentTab = 0
>     End If
>     ' ---
>     Call LS_Refresh
>     PropertyChanged "TabCount"
> End Property

> Property Get TabCount() As Integer
>     TabCount = mTabCount
> End Property

> ' ##################################################
> '
> Property Let CurrentTab(Value As Integer)

>     If LF_BadTabNo("Set CurrentTab", 0, Value) Then
>       Exit Property
>     End If
>     ' ---
>     Call LS_ChangeTab(Value)
> End Property

> Property Get CurrentTab() As Integer
>     CurrentTab = mCurrentTab
> End Property

> '
> ' --- TabCaption
> '
> Property Let TabCaption(TabNo%, Value$)

>     If LF_BadTabNo("Set TabCaption", 1, TabNo) Then Exit Property
>     mTabCaption(TabNo) = Value$
>     Call LS_Refresh
> End Property

> Property Get TabCaption(TabNo%) As String
>     If LF_BadTabNo("Get TabCaption", 1, TabNo) Then Exit Property
>     TabCaption = mTabCaption(TabNo)
> End Property

> '
> ' --- Ratio - Tabs to Base Box
> '
> Property Let BaseRatio(ByVal Value As Integer)

>     If Value < 0 Then Value = 0
>     If Value > 100 Then Value = 100
>     If mBaseRatio = Value Then Exit Property

>     mBaseRatio = Value
>     Call LS_Refresh
>     PropertyChanged "BaseRatio"
> End Property

> Property Get BaseRatio() As Integer
>     BaseRatio = mBaseRatio
> End Property

> Public Property Get Font() As StdFont
>     Set Font = UserControl.Font
> End Property

> Public Property Set Font(F As StdFont)
>     Set UserControl.Font = F
>     Call LS_Refresh
>     PropertyChanged "Font"
> End Property

> Property Let BackColor(Value As OLE_COLOR)
>     mBackColor = Value
>     Call LS_Refresh
>     PropertyChanged "BackColor"
> End Property

> Property Get BackColor() As OLE_COLOR
>     BackColor = mBackColor
> End Property

> Property Let ForeColor(Value As OLE_COLOR)
>     mForeColor = Value
>     Call LS_Refresh
>     PropertyChanged "ForeColor"
> End Property

> Property Get ForeColor() As OLE_COLOR
>     ForeColor = mForeColor
> End Property

> Property Let HighlightColor(Value As OLE_COLOR)
>     mHighlightColor = Value
>     Call LS_Refresh
>     PropertyChanged "HighlightColor"
> End Property

> Property Get HighlightColor() As OLE_COLOR
>     HighlightColor = mHighlightColor
> End Property

> '
> ' --- Refresh Off
> '
> Property Let RefreshOffFlag(Value As Boolean)
>     mRefreshOffFlag = Value
> End Property
> Property Get RefreshOffFlag() As Boolean
>     RefreshOffFlag = mRefreshOffFlag
> End Property

> '
> ' ---
> '

> '
> ' --- Range Check Utility
> '
> Private Function LF_BadTabNo(Section$, Min%, TabNo%) As Boolean
>     If TabNo < Min Or TabNo > mTabCount Then
>        MsgBox "ETabSim.ctl - Invalid " + Section$ + Str$(TabNo)
>        LF_BadTabNo = True
>     End If
> End Function

> ' ##################################################
> '
> '   Activity
> '
> ' ##################################################

> ' ##################################################
> '
> '
> '
> Private Sub UserControl_MouseUp(Button As Integer, Shift As Integer, X
> As Single, Y As Single)
>     Dim Q%, L9%

>     If Y < cmnTopSpace Then Exit Sub
>     If Y > cmnBaseTop Then Exit Sub

>     For L9 = 1 To mTabCount
>         If X > cmnTabLeft(L9) Then
>            If X < cmnTabRight(L9) Then
>               Q = L9
>               Exit For
>            End If
>         End If
>     Next
>     If Q Then
>        If Q <> mCurrentTab Then
>           Call LS_ChangeTab(Q)
>        End If
>     End If
> End Sub

> ' ##################################################
> '
> '   Private Utilities
> '
> ' ##################################################

> Private Sub LS_ChangeTab(NewTab%)
>     Dim Q%, Refused As Boolean

>     Q = NewTab
>     RaiseEvent OnTabRequestChange(Q, Refused)
>     If Refused Then Exit Sub

>     mCurrentTab = NewTab
>     Call LS_Refresh
>     RaiseEvent OnTabChange(NewTab)
> End Sub

> Private Sub UserControl_Resize()
>     If Width < 255 Then
>        Width = 255
>     End If
>     ' Design Mode - Always Refresh
>     If UserControl.Ambient.UserMode = False Then
>        Call LS_Refresh
>        Exit Sub
>     End If
> End Sub

> Private Sub UserControl_Paint()
>     Call LS_Refresh
> End Sub

> ' ##################################################
> '
> ' Draw All Tabs
> '
> Private Sub LS_Refresh()
>     Static InRefresh As Boolean
>     Dim L9%, TV&, TH&, BV&, BH&

>     If InRefresh Then Exit Sub
>     If mRefreshOffFlag Then Exit Sub
>     If cmnReadingPropertiesFlag Then Exit Sub

>     InRefresh = True

>     ReDim cmnTabLeft(mTabCount)
>     ReDim cmnTabRight(mTabCount)

>     Cls

>     ScaleMode = vbPixels
>     DrawMode = vbCopyPen
>     DrawWidth = 1
>     cmnTopSpace = ScaleHeight / 10

>     ' --- For the Base Box - %age of Total Height
>     TV = ScaleHeight * (100 - mBaseRatio) / 100
>     BV = ScaleHeight - 1
>     BH = ScaleWidth - 4

>     If mBaseRatio > 0 Then
>        cmnBaseTop = TV
>        Call LS_DrawBase(TV, BV, BH + 3)
>     End If

>     ' --- Tabs
>     For L9 = 1 To mTabCount

>         If L9 <> mCurrentTab Then
>            Call LS_DrawTab(L9, False, TV, BH)
>         End If
>     Next
>     If mCurrentTab Then
>        Call LS_DrawTab(mCurrentTab, True, TV, BH)
>     End If

>     InRefresh = False

> End Sub

> ' ================================================
> '
> '  Draw Base of Tabs Control
> '
> Sub LS_DrawBase(TV&, BV&, BH&)

>     ' --- Left Hand White
>     Call LineV(0, TV, BV, vbWhite)

>     ' --- Top (Mid) Line White
>     Call LineH(TV, 0, BH, vbWhite)

>     ' --- Right Hand Grey
>     Call LineV(BH, TV + 1, BV - 1, vbButtonShadow)

>     ' --- Right Hand Black - BV+1 overruns
>     Call LineV(BH, TV, BV, vbBlack)

>     ' --- Bottom Line Grey
>     Call LineH(BV - 1, 1, BH - 1, vbButtonShadow)

>     ' ---

...

read more »

 
 
 

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

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.

2. OLEDBSQL connection

3. Getting tab order for a dialog control

4. Native Image Generator

5. Tab order with a tab control

6. Generic Tab control and Tab pages

7. Set background and pages' colours in a Tab Control??

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

9. Q: How to drag 'n drop tabs within tab control...

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

11. control container tab handling/order question