471,350 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Inheriting from TabPageCollection and TabPage visibility?

Hello All,

First I tried to inherit from the TabPageCollection class but received the
following error message:

No overload for method 'TabPageCollection' takes '0' arguments

I also tried implementing a custom collection and the tabpages show up
during design time in the properties but the tabs are never visible during
design or runtime. The collection contains classes inherited from a tabpage
control.

In short, I just want the tabs to show up during design and runtime and I
need the custom properties to be available during runtime.

Any ideas?

Thanks & Regards,

TC
Dec 16 '05 #1
2 4749
Hi TCook,

Just a wild guess from my getting to know c# as I havn't ventured to any
serious codeing yet.

This error occurs because you have not explicilty added a call to the base
class'es constructor in your derived class'es constructor.When you don't add
this call the compiler adds a parameterless base constructor call. I
havn't checked but would assume that the constructor for TabPageCollection
is passed some arguments.

If this is the case, you would have to add the following to your derived
class'es constructor. " :base(x,y,z...) " where x,y,z.. match the arguments
for the base class'es constructor, in this case TabPageCollection

If your base class had, as one of its constructors, a constructor that took
no arguments, you would have got away with not adding the :base(x,y,z...) to
your derived constructor. Must be that TabPageCollection does not have a
parameterless constructor amongst its constructors.

Hence the error message
No overload for method 'TabPageCollection' takes '0' arguments
could perhaps be more clearly stated as
'TabPageCollection' does not have a '0' argument constructor method
to overload from your derived class

First I tried to inherit from the TabPageCollection class but received the
following error message:

No overload for method 'TabPageCollection' takes '0' arguments


Can't help with the rest of your problem at the moment

Mark Carew
Brisbane Australia
Dec 16 '05 #2
Hi TCook,

Just a wild guess from my getting to know c# as I havn't ventured to any
serious codeing yet.

This error occurs because you have not explicilty added a call to the base
class'es constructor in your derived class'es constructor.When you don't add
this call the compiler adds a parameterless base constructor call. I
havn't checked but would assume that the constructor for TabPageCollection
is passed some arguments.

If this is the case, you would have to add the following to your derived
class'es constructor. " :base(x,y,z...) " where x,y,z.. match the arguments
for the base class'es constructor, in this case TabPageCollection

If your base class had, as one of its constructors, a constructor that took
no arguments, you would have got away with not adding the :base(x,y,z...) to
your derived constructor. Must be that TabPageCollection does not have a
parameterless constructor amongst its constructors.

Hence the error message
No overload for method 'TabPageCollection' takes '0' arguments
could perhaps be more clearly stated as
'TabPageCollection' does not have a '0' argument constructor method
to overload from your derived class

First I tried to inherit from the TabPageCollection class but received the
following error message:

No overload for method 'TabPageCollection' takes '0' arguments
Can't help with the rest of your problem at the moment

Mark Carew
Brisbane Australia
"TCook" <ge**********@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl... Hello All,

First I tried to inherit from the TabPageCollection class but received the
following error message:

No overload for method 'TabPageCollection' takes '0' arguments

I also tried implementing a custom collection and the tabpages show up
during design time in the properties but the tabs are never visible during
design or runtime. The collection contains classes inherited from a
tabpage control.

In short, I just want the tabs to show up during design and runtime and I
need the custom properties to be available during runtime.

Any ideas?

Thanks & Regards,

TC

Dec 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by TMB333 | last post: by
1 post views Thread by Dmitry Karneyev | last post: by
8 posts views Thread by touf | last post: by
6 posts views Thread by ray well | last post: by
6 posts views Thread by =?Utf-8?B?U2hhcm9u?= | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.