473,395 Members | 1,696 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,395 software developers and data experts.

Dynamic create tab pages on a tab control

I done some looking on Google and could not come up with a way to
dynamically create tab pages on a tab control.

Does anyone have a link to any examples.

Regards
Jeff
Oct 24 '07 #1
3 22242
Jeff,

Why not just use the Add method on the TabPageCollection returned by the
TabPages property on the TabPage control?

// The tabpage.
TabPage tabPage = new TabPage();

// Add to the tab control.
tabControl.TabPages.Add(tabPage);
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jeff" <jeff@[_nospam_].hardsoft.com.auwrote in message
news:13*************@corp.supernews.com...
>I done some looking on Google and could not come up with a way to
dynamically create tab pages on a tab control.

Does anyone have a link to any examples.

Regards
Jeff

Oct 24 '07 #2
Thanks Nicholas

I have come from another programming language where each tab was a form
and thought this would be harder than you just indicated.

Ok now how can I stop the pages from being added to the form on
initialization.

At the moment when a form open it creates all the tabs which takes time.
Is there a property I can set to prevent the pages being created and
then use this method to add the ones I want.

Nicholas Paldino [.NET/C# MVP] wrote:
Jeff,

Why not just use the Add method on the TabPageCollection returned by the
TabPages property on the TabPage control?

// The tabpage.
TabPage tabPage = new TabPage();

// Add to the tab control.
tabControl.TabPages.Add(tabPage);

Oct 24 '07 #3
Jeff,

If you don't want the pages to be added when the form is opened, then
you will have to remove the pages, and then add them programatically
elsewhere.

You can look at the designer-generated code and move that to another
section.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jeff" <jeff@[_nospam_].hardsoft.com.auwrote in message
news:13*************@corp.supernews.com...
Thanks Nicholas

I have come from another programming language where each tab was a form
and thought this would be harder than you just indicated.

Ok now how can I stop the pages from being added to the form on
initialization.

At the moment when a form open it creates all the tabs which takes time.
Is there a property I can set to prevent the pages being created and then
use this method to add the ones I want.

Nicholas Paldino [.NET/C# MVP] wrote:
>Jeff,

Why not just use the Add method on the TabPageCollection returned by
the TabPages property on the TabPage control?

// The tabpage.
TabPage tabPage = new TabPage();

// Add to the tab control.
tabControl.TabPages.Add(tabPage);
Oct 25 '07 #4

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

Similar topics

3
by: Danny | last post by:
How do you guys make listings such as product listings and their detail pages more crawler friendly, if they are genrated using dynamic asp pages. If your ASP uses a format like this:...
2
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe...
0
by: gg.2.starfire | last post by:
WebCheck (http://www.raycosoft.com/rayco/products/webcheck) is a program for testing and analyzing static or dynamic web pages. WebCheck fetches web pages, applies detailed tests to each web page...
15
by: theo | last post by:
Hi, I'm working on a horizontal row menu, to use like folder tabs. Does anyone know what the CSS style "cursor" is supposed to produce? Any working samples? I put it in the code, but can't see...
2
by: hb | last post by:
Hi, I have a page that uses dynamic generated web user control. On the eupdate.aspx, I get: === <asp:table id="tblE" runat="server"> <asp:tablerow id="rE" runat="server"> <asp:tablecell...
1
by: Grey | last post by:
is it possible to dynamic create control in runtime. I want to create a new textbox on every click on the button.
3
by: Grey | last post by:
I know i can use placeholder control for dynamic create controls. but my requirement is i need to create multiple controls. when the user click the button, one textbox will be created. If user...
1
by: zhouzhendong | last post by:
Hi, I just wonder whether it is possible to create Tab Control in runtime? The reason I want that is as follows: I wanna show a table that contains several categories of information of clients,...
1
by: rushikesh.joshi | last post by:
Hi All, I want some charting functionality in my ASP.NET application. I want to show a multiple bar on my web page. It's based on down time of different servers. like server1: down betn 4 AM...
5
by: Charles Zhang | last post by:
I am creating dynamic web pages according to the user inputs from a web page. For instance, a user typed in a text, I would want the text being the source code of the dynamic page. My...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
jinu1996
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 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.