Working with Tabs

  • Thread starter Norbert Thek (News)
  • Start date
N

Norbert Thek (News)

Hello

I'm writing an APP for an PocketPC
Because of the small Size of the Display I want to use Tabs!

The problem is, if I work with the VS-Designer It puts all Code
in one File. I also have to put some code there to prepare Data for
Viewing. Thats why I fear that i loose the overview in the file

Is there some way to easily split the tabs in extra files
and also use the FormDesigner of VS.net?

I know I can do everything dynamicly but then I lose the advanteges
of the Form Designer.


Norbert
 
H

Herfried K. Wagner [MVP]

Norbert,

Norbert Thek (News) said:
The problem is, if I work with the VS-Designer It puts all Code
in one File. I also have to put some code there to prepare Data for
Viewing. Thats why I fear that i loose the overview in the file

Is there some way to easily split the tabs in extra files
and also use the FormDesigner of VS.net?

You can create a usercontrol for each tab and add these usercontrols to the
tabs (I didn't check if this is supported in the Compact Framework too, but
it's worth a try).
 
T

Tim Wilson

The only solution that I see is to handle the code at some point. So, since
the UserControl isn't available in the CF, you can visually design your tab
using a temp form (a form that you will eventually remove from your project
once it has served its purpose) and then cut and paste the relevent code in
the InitializeComponent() method into a new Control class. This essentially
gives you a UserControl without the designer experience. You could then
create an instance of each of your tab page controls, in the constructor of
the form containing the tab control, and add each one to the appropriate tab
page on the tab control. If you create the custom tab page controls to look
like UserControls (by using an InitializeComponent() method in the control
code), then come V2.0 when UserControls are supported, you can just change
your tab page controls to derive from UserControl instead of Control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top