473,468 Members | 1,294 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Tab pages in different files?

OK, I'm coming from a C++ (MFC) background, so bear with me :)

I've recently started a C# Windows Forms app. In the main form, I have a
tab control. I have added several different tabs to it (all presently
empty). Now, in C++ each of these tab's operated somewhat independently -
they were usually their own class, and contained in separate files. That
made managing them easy.

From what I've seen so far in C# however, it is creating the tabpages all
inside the mainform.cs file. I'm looking at possibly having ~ 10 tabs, so
by the time I add functionality to the tabs, this could get very very messy.

Is there a good way around this?
Thanks!

--
Adam Clauss
ca*****@tamu.edu
Nov 15 '05 #1
1 2226
Adam,

What I would do is create separate user controls for each tab page.
This way, the code logic is in separate files. Then, I would add an
instance of each control to each tab page.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Adam Clauss" <ca*********************@tamu.edu> wrote in message
news:el**************@TK2MSFTNGP11.phx.gbl...
OK, I'm coming from a C++ (MFC) background, so bear with me :)

I've recently started a C# Windows Forms app. In the main form, I have a
tab control. I have added several different tabs to it (all presently
empty). Now, in C++ each of these tab's operated somewhat independently -
they were usually their own class, and contained in separate files. That
made managing them easy.

From what I've seen so far in C# however, it is creating the tabpages all
inside the mainform.cs file. I'm looking at possibly having ~ 10 tabs, so
by the time I add functionality to the tabs, this could get very very messy.
Is there a good way around this?
Thanks!

--
Adam Clauss
ca*****@tamu.edu

Nov 15 '05 #2

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

Similar topics

0
by: Markus Keuthmann | last post by:
I want to export all images from the DB2 sample database (sample) in different files. My export-statement: db2 "export to G:\images\emp_photo.del of del lobs to G:\images\ lobfile image...
4
by: Martha | last post by:
I have one tab control with 5 tab pages. I want to color each tab page a different color. Does anyone know how to color the entire tab page a unique color? (that includes the tab part of the tab...
1
by: Rico Rivera | last post by:
I have two files: FileA.vb FileB.vb FileA.vb contains the following sample code: NameSpace SomeNamespace Public Class SomeClassA Public Shared Function MethodA() As String
13
by: Kavi | last post by:
I was hoping any javascript and asp gurus may help me with this problem, o.k well here it is.... i have a form, which has a user and password, that a user enters when i want to submit this...
1
by: Mark Denardo | last post by:
Ok here's my problem: I have a bunch of Classes at the same namespace level say "abc.xyz". And all Classes reside in different files. abc.xyz.Class1 (in Class1.vb) abc.xyz.Class2 (in...
1
by: gomzi | last post by:
Hi, I would like to know as to how one could access a function having a same name but in different files. i.e. is there a way of specifying the name of the file so that the function could be...
12
realin
by: realin | last post by:
hi guys, I have a php file say "class.php" in which a database class is defined. I have got another file namely "config.php" which initializes its object as require_once("class.php");...
3
by: ajd335 | last post by:
Hi all, I am using Microsoft 's query analyzer. My query results in a huge number of data. I wanted to store first 500 records into one file.E.g result1.csv and other 500 into result2.csv and so...
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
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
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...
1
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
tracyyun
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...
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,...
0
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...
0
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 ...

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.