473,394 Members | 1,854 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,394 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 4836
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: TMB333 | last post by:
I've researched as much as I can on the issue, but I've not found any clearly defined statement that acknowledges that the Hide method for a TabPage object just doesn't do what it's supposed to do....
1
by: Dmitry Karneyev | last post by:
Hi! I've made a form with combobox and a tabcontrol. Each time the value of combobox changes I need to show only one tabpage from tabcontrol. It works, but the tabcontrol bookmark of selected...
2
by: JG | last post by:
Hi, I have a windows form with a TabControl on it. It has 3 tabpages on it. I have also coded a button that is supposed to 'add' a new tabpage. The code in that clicked event looks like this:...
1
by: RA | last post by:
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...
8
by: touf | last post by:
Hi, I've a tabcontrol that contains many similar tabpages (exactly the same structure with different information), the tabpages number isn't known in the design time it depends of the data. Is...
7
by: Vish | last post by:
Hi, I have a base form from which i want all of my forms to inherit from. The base form has three buttons anchored to the bottom right of the base form. When i first inherit a new form from the...
2
by: hamidmahmood | last post by:
I have a custom user control which contains a tab control and some other controls. I want to expose the tab control's TabPages property via the user control. For that I have created a property ...
6
by: ray well | last post by:
i want a user to be able to change tab pages thru the keyboard, i tried entering the TabPage.text as '&1 Names', "&2 Addresses', etc., so that the user can change pages by type ALT 1, ALT 2, on the...
6
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hello gurus, I want to have a Form with a TabControl, this TabControl will contain TabPage that has controls in it, this TabPage is prepared at design time. I want in runtime to duplicate the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
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...

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.