473,890 Members | 5,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TabPage Sequence Problem

Hi all,

I am working on an application in which there is a form which has a
tabcontrol containing 4 tab pages.
Let the name of the tabpages be A,B,C&D.

The default view is that there are all the tabpages(A-D) in the
Now there is a button on TabPage A & when the button is clicked the
default view changes to a tabcontrol having three tabpages A,B & D.
Also again if i click on the same button the TabControl should show all
the 4 tabPages.

So wat i have done is that when their are 4 tabPages & the button is
clicked i have done
TabControl.TabP ages.Remove(C);

If their are three tabpages & the button is clicked i have done
TabControl.TabP ages.Add(C);

But the problem that i am facing is that the sequence of tabpages is
not proper. It is adding the TabPage C at end( A-B-D-C) but i require
it in between B & D.(A-B-C-D).

Kindly tell me how can i change the sequence of TabPages being
displayed at runtime ??

Warm Regards

Nov 16 '05 #1
4 1889

A known bug, you have to remove D as well and than add C and D again.

(You only remove the references to the tabcontrol not the tabpages of course
and add those again)

I hope this helps,

Nov 16 '05 #2
You don't need to remove D just swap C and D. Removing tabpages and then
re-adding, just to insert one, will cause flicker.

See the example on my site:
http://dotnetrix.co.uk/tabcontrols.html --> Hide and Show Tabpages in a

Mick Doherty
"Cor Ligthert" <no************ @planet.nl> wrote in message
news:ug******** *******@TK2MSFT NGP09.phx.gbl.. .

A known bug, you have to remove D as well and than add C and D again.

(You only remove the references to the tabcontrol not the tabpages of
course and add those again)

I hope this helps,


Nov 16 '05 #3

In this case the OP says that he has removed first tabpage C because of his
I think that it will not make much difference than and maybe look even more
smooth in this case.

Nov 16 '05 #4
I'll agree, that in this case, it won't make much difference since there is
only one tabpage to remove before adding one and replacing it, but I would
still recommend swapping over removing and re-adding.

Mick Doherty
"Cor Ligthert" <no************ @planet.nl> wrote in message
news:ux******** *****@TK2MSFTNG P15.phx.gbl...

In this case the OP says that he has removed first tabpage C because of
his purpose.
I think that it will not make much difference than and maybe look even
more smooth in this case.


Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: TMB333 | last post by:
I've researched as much as I can on the issue, but I've not found any clearly defined statement that acknowledges that the Hide method for a TabPage object just doesn't do what it's supposed to do. This appears to be a bug, or maybe I'm using it incorrectly? TabPage.Hide should hide the referenced TabPage object, should it not? Do I have to 'refresh' the Windows form somehow? The closest I've come to any means of hiding a TabPage from...
by: JG | last post by:
Hi, I have a windows form with a TabControl on it. It has 3 tabpages on it. I have also coded a button that is supposed to 'add' a new tabpage. The code in that clicked event looks like this: tabPage tpNew = new TabPage("TabPage4"); this.tabControl1.TabPages.Add(tpNew); tpNew.Controls.Add(this.label1);
by: Likhith Areekkal | last post by:
Hello, Here is my problem: I did a layout of the tab pages as follows (in the given order): 'Login' 'Log Calls' 'Priority' 'Action' 'View' (total 5 tab pages) Now, the problem is that the tabs are not appearing in the sequence I
by: sdbranum | last post by:
Tab pages, which I have added to forms in design view, are occassionally reordered without warning. Other than hard-coding the tab order by clearing then readding these same tab pages outside InitializeComponent, is there another way to prevent such reodering? Steve
by: Tee | last post by:
Hi, I have a tabcontrol that has a tabpage, I want to add another tabpage on runtime, but I want the tabpage to be added to the 1st tab, anyone know how to do it? Thanks, Tee
by: Tom | last post by:
I have a form with a tabControl with 6 tabPages. There are textBoxes on all the tabPages that are bound to a dataset. The user can click a modify button, edit whatever textBoxes they want and then click an OK button. The OK button handler loops over all the textBoxes on all the tabPages to validate their contents. The problem is that the textBoxes on any tabPage which has not been viewed appear empty to the code. It appears that VB...
by: Ratan | last post by:
I have a form that has a tabcontrol with 5 tabpages. i want to rename the tabpages in runtime. Actually i want to right click the tabpage i want to rename and edit the text there itself. How to acheive it? Any help will be greatlty appreciated. /Ratan
by: ray well | last post by:
i want a user to be able to change tab pages thru the keyboard, i tried entering the TabPage.text as '&1 Names', "&2 Addresses', etc., so that the user can change pages by type ALT 1, ALT 2, on the keyboard. but the text showing up in the tab is '&1 Names' instead of the '1' being underlined, and being able to be accessed thru the keyboard. how can i get a user to be able to change from TabPage to TabPage thru the keyboard? i find it...
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hello gurus, I want to have a Form with a TabControl, this TabControl will contain TabPage that has controls in it, this TabPage is prepared at design time. I want in runtime to duplicate the TabPage that wad made during the design time together with all its controls, but without the controls data. Is there an easy way to do that?
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.