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

Home Posts Topics Members FAQ

Adding controls to an inherited UserControl

I have sucessfully created a control that inherits from a UserControl.

Now I want to extend this by adding extra controls but if I try and drop a
control onto the form then I just get the "No" cursor and I'm not able to
drop the control onto the designer.

I can add controls in the InitializeCompo nent procedure of my inherited
UserControl and they do appear in the designer at design time but am unable
to edit any of it properties.

Is this by design? Can I only extend the non-visible part of this class? If
so, whats the logic behind it?

TIA
Dec 5 '05 #1
1 1907
I think I have figured out what I was doing. My original UserControl actualy
had a GroupBox taking up its entire designable surface. So when I was trying
to drop a control onto the inherited UserControl it was actually being
droppped onto the GroupBox of the base class which was declared as private.
By changing this to public it soved my problem.... however, is this a
sensible way to deal with the problem?

TIA

"elziko" <el****@yahoo.c o.uk> wrote in message
news:OE******** ********@tk2msf tngp13.phx.gbl. ..
I have sucessfully created a control that inherits from a UserControl.

Now I want to extend this by adding extra controls but if I try and drop a
control onto the form then I just get the "No" cursor and I'm not able to
drop the control onto the designer.

I can add controls in the InitializeCompo nent procedure of my inherited
UserControl and they do appear in the designer at design time but am
unable to edit any of it properties.

Is this by design? Can I only extend the non-visible part of this class?
If so, whats the logic behind it?

TIA

Dec 5 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3581
by: Jim | last post by:
I am having some trouble with user controls and would appreciate any input / advice on where to go with this... :) 1. The first problem, and perhaps the root of the others, is that I have several user controls that are inherited user controls, based on one class, which is in turn based on System.Windows.Forms.UserControl. We'll call this...
1
7642
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...
0
916
by: Brandon Potter | last post by:
I am building a large template-based ASP.NET app using inheritance and loading user controls as the method of loading templates and populating them. I catch the requests for pages in Global.asax and load the desired page that inherits the (or an inherited class of) base template class. I have a top-template level class called...
11
5271
by: Crirus | last post by:
I need to derive the Windows.Forms.Control 2 times so I design a class like this Public Class BMControl Inherits System.Windows.Forms.UserControl Public Class MapControl Inherits BMControl
3
1480
by: MikeY | last post by:
Hi everyone, I'm trying to figure out, on my windows form, of what is the best way to add various custom controls at various times during run-time. The problem is that they will need to be in the same spot as each other, depending on what is being called at that particular time by the user. I have been trying to use Inherited user controls,...
1
1444
by: Eric Theil | last post by:
Hello, I'm just getting into ASP.Net 2.0 and I can't figure out an effective way (or at least one that I think is effective) to perform one of the techniques I used to use in 1.0/1. As an example, I have multiple user controls whose code behind functionality is identical, but display is completely different, so I would create a base...
1
8342
by: Don | last post by:
I'm getting the following exception displayed in the task list at design time for my project: "Code generation for property 'Controls' failed. Error was: 'Object reference not set to an instance of an object.'" I've traced the problem to a custom control I created that inherits from Inherits System.Windows.Forms.TextBox. In this custom...
2
1431
by: =?Utf-8?B?RGlmZmlkZW50?= | last post by:
Hello All, I have a base usercontrol which has a datagrid and a virtual method to populate the datagrid. I developed a child usercontrol which inherits the base usercontrol and also overrides the virtual method. I have a page on which I placed these usercontrols together. The base usercontrol's datagrid gets populated fine however in the...
0
900
by: Phill W. | last post by:
OK, so VB'2005 let's you build whizzo UserControls with all that Anchoring and Docking stuff taking care of the layout, so you don't have to hard-code it all anymore. But ... When you then /inherit/ from that UserControl, how in Blue Blazes do you persuade the Forms Designer /not/ to suspend the layout events that keep the base Control...
0
7475
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
7664
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
7921
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...
1
7437
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5343
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
4958
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
3465
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...
1
1900
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1023
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.