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 6 1182
There's probably a better way, but some C# code that seems to work is:
TabPage p = new TabPage("My Tab Page");
this.tabControl1.TabPages.Add(p);
for (int lcv = this.tabControl1.TabPages.Count - 1; lcv > 0; lcv--)
{
this.tabControl1.TabPages[lcv] = this.tabControl1.TabPages[lcv - 1];
}
this.tabControl1.TabPages[0] = p;
"Tee" <th*@streamyx.com> wrote in message
news:Ov**************@TK2MSFTNGP12.phx.gbl... 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
Tee,
Because of a bug in the tabpages, you have probably first to "remove" all
the existing ones and than "add" again all the ones in the sequence that you
want them.
Cor
"Cor Ligthert" <no************@planet.nl> wrote in message
news:OZ**************@TK2MSFTNGP11.phx.gbl... Tee,
Because of a bug in the tabpages, you have probably first to "remove" all the existing ones and than "add" again all the ones in the sequence that you want them.
Cor
No! Don't remove tabpages as this will cause unsightly flicker. Simply swap
tabpages.
On my site you'll find routines for inserting a tabpage which uses a loop to
swap tabpages until the new tabpage is where you want it. http://dotnetrix.co.uk/tabcontrols.html --> Hide and show tabpages in
Tabcontrol
--
Mick Doherty http://dotnetrix.co.uk/nothing.html
There's no better way ;-)
--
Mick Doherty http://dotnetrix.co.uk/nothing.html
"Ed Kaim" <ed@sharplogic.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... There's probably a better way, but some C# code that seems to work is: TabPage p = new TabPage("My Tab Page");
this.tabControl1.TabPages.Add(p);
for (int lcv = this.tabControl1.TabPages.Count - 1; lcv > 0; lcv--)
{
this.tabControl1.TabPages[lcv] = this.tabControl1.TabPages[lcv - 1];
}
this.tabControl1.TabPages[0] = p;
"Tee" <th*@streamyx.com> wrote in message news:Ov**************@TK2MSFTNGP12.phx.gbl... 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
Mick,
Everything can be done better, however to say a screaming "No" to it is in
my opinion overdone.
Not angry, just friendly laughing.
Cor
Sorry Cor.
I'd just got up and hadn't had my fix of Coffee yet.
--
Mick Doherty http://dotnetrix.co.uk/nothing.html
"Cor Ligthert" <no************@planet.nl> wrote in message
news:O4*************@TK2MSFTNGP09.phx.gbl... Mick,
Everything can be done better, however to say a screaming "No" to it is in my opinion overdone.
Not angry, just friendly laughing.
Cor 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....
|
by: meh |
last post by:
New to C#...
I have a tab page with a handful of controls on it (label, combobox, etc.).
Is it possible to "boilerplate a tabPage with the controls "like a MDI
childForm" so that adding a new...
|
by: Sumit |
last post by:
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...
|
by: RA |
last post by:
Hi
1) I want to create a TabPage class in design mode - how do I do it? What
type of project should I use? Is it going to be a custom control?
2) I have a TabControl that I would like to add to...
|
by: Cynthia |
last post by:
I knew that "Hide" doesn't work with Tabpage if I want to hide it. I should
use Remove/Add. But I have some other controls in the tabpage which I don't
want to use code to dynamiclly create them....
| |
by: touf |
last post by:
Hi,
I've a tabcontrol that contains many similar tabpages (exactly the same
structure with different information), the tabpages number isn't known in
the design time it depends of the data.
Is...
|
by: Stan Sainte-Rose |
last post by:
First, I thank you Herfried.
I have 3 tabpages in a tabcontrol.
I would like to force the user to stay in the current tabpage until he
doesn't correctly fill some textboxes.
I know how to...
|
by: Ingo Beyer |
last post by:
Hello,
I created a windows form with vs.net 2005 / c#. This control has a
TabControl with 16 TabPages. On every TabPage there are a diffrent number of
Controls. - Every TabPage has a background...
|
by: Rex the Strange |
last post by:
I suspect the answer to this question is "you can't," but here goes
anyway:
I have a tabcontrol which contains, of course, various tabpages (added
programmatically at runtime, but this is...
|
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...
|
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...
| |
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...
|
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...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
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...
| |
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...
| |