473,805 Members | 1,963 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 4857
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
13579
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 'refresh' the Windows form somehow? The closest I've come to any means of hiding a TabPage from...
1
3887
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
1689
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
7652
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 candynamicaly load to the TabControl at runtime. Thanks
8
12070
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
4968
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 new controls and building it i found that the 3 buttons from the base form disappeared. When i...
2
2150
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
4571
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. how can i get a user to be able to change from TabPage to TabPage thru the keyboard? i find it...
6
12935
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
9716
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10607
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9182
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6875
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.