By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,899 Members | 1,350 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,899 IT Pros & Developers. It's quick & easy.

Creating TabPage and dynamicaly adding to TabControl

P: n/a
RA
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 it the TabPage created in
step 1. I don't want to draw the TabPage on the Tabcontrol in design mode,
but to have a few TabPage controls that I candynamicaly load to the
TabControl at runtime.

Thanks
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
UserControl has a Design Surface.
Create the tabPage as a userControl and when you are done laying out the
controls on it, close the designer and change the inheritance from
UserControl to TabPage.

A TabPage is Inherited from ScrollableControl as is UserControl, so theres
not really much difference between the two other than TabPages can be added
to TabControls.

Don't open the designer whilst the control is inherited from TabPage or the
layout will get messed up. If you need to tweak something on the design
surface then temporarily change inheritance back to UserControl.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"RA" <ro****@hotmail.com> wrote in message
news:Ol**************@TK2MSFTNGP15.phx.gbl...
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 it the TabPage created
in
step 1. I don't want to draw the TabPage on the Tabcontrol in design mode,
but to have a few TabPage controls that I candynamicaly load to the
TabControl at runtime.

Thanks

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.