473,473 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Create 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 InitializeComponent 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 1895
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.co.uk> wrote in message
news:OE****************@tk2msftngp13.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 InitializeComponent 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
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...
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...
0
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...
11
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
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...
1
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...
1
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...
2
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...
0
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...
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
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
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...
0
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
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.