473,545 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inheriting from TabPageCollecti on and TabPage visibility?

Hello All,

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

No overload for method 'TabPageCollect ion' 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 4842
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.Whe n 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 TabPageCollecti on
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 TabPageCollecti on

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 TabPageCollecti on does not have a
parameterless constructor amongst its constructors.

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

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

No overload for method 'TabPageCollect ion' 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.Whe n 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 TabPageCollecti on
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 TabPageCollecti on

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 TabPageCollecti on does not have a
parameterless constructor amongst its constructors.

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

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

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

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

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

No overload for method 'TabPageCollect ion' 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
13558
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. This appears to be a bug, or maybe I'm using it incorrectly? TabPage.Hide should hide the referenced TabPage object, should it not? Do I have to...
1
3879
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 tabpage is visible. I could be great if it's possible to hide it beacuse this element is useless in my case. Can anybody help me?
2
1676
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: tabPage tpNew = new TabPage("TabPage4"); this.tabControl1.TabPages.Add(tpNew); tpNew.Controls.Add(this.label1);
1
7641
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 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...
8
12049
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 there a way to clone ( copy the structure) a tabpage to create anew one by code? thanks.
7
4950
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 base form everything seems to be fine. The 3 buttons from the base form show up on the bottom right of the inherited form. But as i started adding...
2
2131
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 public TabPageCollection TabPages { get { return tabControl1.TabPages;
6
4556
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 keyboard. but the text showing up in the tab is '&1 Names' instead of the '1' being underlined, and being able to be accessed thru the keyboard....
6
12870
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 TabPage that wad made during the design time together with all its controls, but without the controls data. Is there an easy way to do that?
0
7470
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7405
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7659
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
5975
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5334
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4949
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3455
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1019
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.