473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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
tabControl.
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.TabPages.Remove(C);

If their are three tabpages & the button is clicked i have done
TabControl.TabPages.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
Sumit

Nov 16 '05 #1
4 1857
Sumit,

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,

Cor
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
Tabcontrol.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Cor Ligthert" <no************@planet.nl> wrote in message
news:ug***************@TK2MSFTNGP09.phx.gbl...
Sumit,

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,

Cor

Nov 16 '05 #3
Mick,

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.

Cor
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
http://dotnetrix.co.uk/nothing.html
"Cor Ligthert" <no************@planet.nl> wrote in message
news:ux*************@TK2MSFTNGP15.phx.gbl...
Mick,

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.

Cor

Nov 16 '05 #5

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

Similar topics

4
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....
2
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:...
2
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...
9
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...
6
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
4
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...
4
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...
6
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...
6
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.