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

Copying Tab pages

I want to add additional tab pages on my form e.g.

Dim db As New TabPage
tabDetails.Controls.Add(db)

Where tabDetails is the tabcontrol on the form.

What is the best way of ensuring that all of the controls (e.g. textboxes,
combo boxes etc) from the first tab page get copied onto any new tabpages I
create ?

Thanks

Nov 21 '05 #1
4 982
DotNetNewbie,
What is the best way of ensuring that all of the controls (e.g. textboxes,
combo boxes etc) from the first tab page get copied onto any new tabpages
I
create ?


Your question has a simple answer. That is where usercontrols are build for.

I hope this helps,

Cor
Nov 21 '05 #2
no.

I know I could do a sweep of all controls on the tabpage and add them

Dim obj As Object

For Each obj In tbMain.Controls
'add the control to tabpage here
Next obj

But I'm really asking is there a quicker/better/recommended way of having
the controls from one tabpage onto the new one just created thus:

Dim db As New TabPage
tabDetails.Controls.Add(db) 'none of the existing controls get
copied yet....

???

Thanks

"Cor Ligthert" wrote:
DotNetNewbie,
What is the best way of ensuring that all of the controls (e.g. textboxes,
combo boxes etc) from the first tab page get copied onto any new tabpages
I
create ?


Your question has a simple answer. That is where usercontrols are build for.

I hope this helps,

Cor

Nov 21 '05 #3
"dotnetnewbie" <do**********@discussions.microsoft.com> schrieb:
I want to add additional tab pages on my form e.g.

Dim db As New TabPage
tabDetails.Controls.Add(db)

Where tabDetails is the tabcontrol on the form.

What is the best way of ensuring that all of the controls (e.g. textboxes,
combo boxes etc) from the first tab page get copied onto any new tabpages
I
create ?


What you can do is designing a usercontrol that contains all the tabpage's
controls. This control can be instantiated at runtime and added to another
tabpage. However, notice that this won't automatically copy
values/selections made in an existing instance of the usercontrol to the new
instance.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
I understand now - thanks Cor

"Cor Ligthert" wrote:
DotNetNewbie,
What is the best way of ensuring that all of the controls (e.g. textboxes,
combo boxes etc) from the first tab page get copied onto any new tabpages
I
create ?


Your question has a simple answer. That is where usercontrols are build for.

I hope this helps,

Cor

Nov 21 '05 #5

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

Similar topics

22
by: Matt | last post by:
When browsing a web page a user has the ability to highlight content on a page (by holding down the left mouse button and dragging the mouse over the desired content). Is there a way to disable...
102
by: me | last post by:
How do I prevent the save/print/email/mypictures toolbar from popping up when IE users place their cursor over photos at my website? Thank you in advance for your help. Signed, me
1
by: Hakan | last post by:
I am regularly downloading an asp web page and what I want to do is to do it automatically The web page consists of one main page and many linked pages to it. Firstly I am selecting the whole page...
0
by: Kirk | last post by:
I have created an application that copies images I select to two printer que's. The images are either AutoCAD plot files (.PLT) or scanned images (.TIF). My method works well for the PLT files on...
7
by: marfi95 | last post by:
Hi all, I have an app that contains a tab control with a tabpage on it. As part of the interface, the user keys in a field that basically identifies how many instances of these tabpages to...
0
by: tsupchurch | last post by:
Good day everyone, I've been searching for a solution to the problem of copying folders using an ASP.NET on a windows 2000 server with .net 1.1. I have tried using the directory class and the...
2
by: Elmo Watson | last post by:
Since I came from the HTML world many years ago - I am just in the habit of copying/FTPing all my ASP.Net websites to the remote server However, I have a friend who says that Publishing is the...
5
by: Josh | last post by:
ASP.Net 2.0 question. I've copied web pages from an another project into a new project using the "Add, Existing Item" menu options It copied over the aspx and aspx.cs files but will not...
2
by: Mufasa | last post by:
Folks, I've copied a working website from a production server to a test server. I've set up IIS to what I think should work and here's what I notice: If I directory browse, I can see all of 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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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,...

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.