By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,168 Members | 2,484 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,168 IT Pros & Developers. It's quick & easy.

Mysterious moving tabs

P: n/a
KC
Has anyone else had the problem of tabs in a tab control changing position
on their own? Sometimes I run my app (in debug mode) and some of the tabs
are in completely different positions. I can shift them back in the tab
control no problem, but it ain't suppose to be doing that in the first
place.

---
Ken
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi KC,

Very known bug it has to do with the Z order. I said to somebody try it with
setting the pages in a loop to BringToFront, I am curious if that works,
because I never tried that.

Maybe you can try?

Cor

....
Has anyone else had the problem of tabs in a tab control changing position
on their own? Sometimes I run my app (in debug mode) and some of the tabs
are in completely different positions. I can shift them back in the tab
control no problem, but it ain't suppose to be doing that in the first
place.

---
Ken

Nov 20 '05 #2

P: n/a
This is a known bug.

You can easily fix that once for all with simple code. You can use the
following code to completely remove TabPages from the TabControl in re-add
them in the correct order. It is important to notice that the content of
TabPages will not be affected.
With TabControl1.TabPages
.Clear()
.Add(TabPage1)
.Add(TabPage2)
.Add(TabPage3)
.Add(TabPage4)
.Add(TabPage5)
End With
This code needs to be placed anywhere after the call to InitializeComponent.
The Form's Load event is a good place for that.
--

HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Concept S2i inc.(www.s2i.com)
"KC" <yo*@dontneed.this> wrote in message
news:uq**************@TK2MSFTNGP11.phx.gbl...
Has anyone else had the problem of tabs in a tab control changing position
on their own? Sometimes I run my app (in debug mode) and some of the tabs
are in completely different positions. I can shift them back in the tab
control no problem, but it ain't suppose to be doing that in the first
place.

---
Ken

Nov 20 '05 #3

P: n/a
It's a well known problem. This question is asked so often that I included
it on my site.
http://dotnetrix.co.uk/tabcontrols.html --> Tabpage order has changed

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"KC" <yo*@dontneed.this> wrote in message
news:uq**************@TK2MSFTNGP11.phx.gbl...
Has anyone else had the problem of tabs in a tab control changing position
on their own? Sometimes I run my app (in debug mode) and some of the tabs
are in completely different positions. I can shift them back in the tab
control no problem, but it ain't suppose to be doing that in the first
place.

---
Ken

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.