Tab control...

  • Thread starter Thread starter Wapiti
  • Start date Start date
W

Wapiti

Ok, I've taken my 10 breaths, but still ... on the tab control... I found
that you can't change the backcolor, bummer. But stuck with it anyway for
v1 of this project.

But now, can anyone explain why the tab order keeps changing on me? I've
gone into the tab collection property box, moved the tabs into the proper
order of my liking -- it appears to take - but the next thing I notice that
the tabs are back out of whack... in an odd order again.

What am "I" doing wrong - or is it another control not ready for prime time?

Thanks,

Mike
 
Hmm, this looked promising ... I'm using VB.net rather than C as the example
uses - but I improvised the fix for VB ... no go - still the tab order is
out of whack.

Have you, or anyone, used this workaround successfully? Maybe I'm
implementing it incorrectly.

How would I know if there is a fix for this tab issue available from MS? I
can't seem to update via the help | check for updates option in vs.net

Thanks again, -m
 
You're right. That doesn't appear to be working. What I've always done is
just go back and manually move the tabs, through the designer, back to the
order that I want them in. It's a pain but it works... at least until the
next time that it decides to reorder them for you.
How would I know if there is a fix for this tab issue available from MS? I
can't seem to update via the help | check for updates option in vs.net
I would usually just do some newsgroup searching
(http://www.google.com/advanced_group_search?hl=en) as well as knowledge
base searching
(http://support.microsoft.com/default.aspx?scid=fh;en-us;KBHOWTO).

--
Tim Wilson
..Net Compact Framework MVP

<Feedback>
Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
</Feedback>
 
Dang, thanks Tim. Seems to -always- reorder them 'for me'. I guess it
knows better than I, how they should be ordered. grin.

Seems that some don't have this problem - or, they say they can't reproduce
the bug. Wish I knew the fix.

Thanks for the reply.
 
I know the C# version works because I took it from a larger project I did
that used it.

-Chris
 
Hopefully this will be fixed with a VS.Net service pack sometime down the
road, or at very least in VS.Net 2005. I could never find out how to repro
this issue either. It seems very erratic.

--
Tim Wilson
..Net Compact Framework MVP

<Feedback>
Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
</Feedback>
 
Not tried it with SP3, but don't see how it would fail. Basically if you
reorder them programmatically after the InitializeComponent stuff runs, I
don't see how it couldn't work, unless the tab positions are somehow
"locked" once added to the collection.

-Chris
 
Hi,

This is my work around....

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

' Bug in Designer messes up the Tab Order, this is a Workaround
'Remove all of the Tab pages
Dim p As TabPage
For Each p In Me.TabControl1.TabPages
Me.TabControl1.Controls.Remove(p)
Next

'Add the pages back in the proper order
Me.TabControl1.Controls.Add(Me.TabPage1)
Me.TabControl1.Controls.Add(Me.TabPage2)
Me.TabControl1.Controls.Add(Me.TabPage3)
Me.TabControl1.Controls.Add(Me.TabPage4)
Me.TabControl1.Controls.Add(Me.TabPage5)
Me.TabControl1.Controls.Add(Me.TabPage6)
Me.TabControl1.Controls.Add(Me.TabPage7)

This makes sure that they always stay in the right order.

Cheers

Robert
 
Hmm, I like it. But curious, do you not lose any of the controls that
you've placed on the tab pages in the designer, after your code removes them
from the tabcontrol?

Thanks for this one!!
 
Back
Top