473,386 Members | 1,785 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,386 software developers and data experts.

Derived user controls / abstract user controls

Hi all,

I want to define a user control (called BaseUserControl) in one
assembly, and define another user control (called derivedUserControl)
in another assembly which derived from BaseUserControl.
I achieve to do this by doing add/new element/derived user control in
my second assembly.

But my problem is the following :
I first write a lot of code for BaseUserControl, then I create
derivedUserControl and write a lot of code for it. And then I want to
change something in BaseUserControl (add a checkBox in it, or a new
function, something I had forgotten at the beginning).
How can I then have derivedUserControl being updated (that is to say
containing the new checkbox for example) ???
For the moment the only way I see is to suppress derivedUserControl
and recreate it from add/new element/derived user control, but this is
very anoying, because I lost all the code I had written for
derivedUserControl.

Is there a better way to do this ??
Another question: I would like my BaseUserControl to be abstract (to
force people that will write derived UserControls to implement some
functionalities).
But when I define this class as abstract, I can not create a new
derivedUserControl (in fact I can, but I have an error from the
designer, and it is not possible to see my new control in the
designer).
Is it possible to do some abstract user controls ?? Should I use
something else, or use them in another way ??
Thanks for any help,
Verane.
Nov 16 '05 #1
0 1611

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

Similar topics

9
by: Daniel Kay | last post by:
Hello! I have written two template classes which implement the observerpattern in C++. I hope I manage to desribe the problem I have. template<class T> class Observer { /* ... */ }; ...
2
by: John B | last post by:
Hello I want to create a set of controls that have some common methods and properties. I was thinking that I should subclass the UserControl class and add these common features there and then...
7
by: Byron | last post by:
I have several user controls that have a few methods in common, such LoadFromForm() which populates an object from controls on the form. I want to call that method from the form in which the...
12
by: Steve Teeples | last post by:
Can someone tell me the correct method of casting and object at run time. Here is a sample of what I'm trying to do. classA acts as a base for classes that execute code in classes derived from...
2
by: Ferdinand Zaubzer | last post by:
Is there any possibility to create a usercontrol deriving from an abstract usercontrol? I could only achieve it by editing the code from "MyControl : System.Windows.Forms.UserControl" to...
8
by: Manuel | last post by:
Hi! If I've a vector filled with abstract classes, can I push in it the derived classes too? Even if derived classes have new methods? I've done some experiments, and it seem I can push the...
6
by: ivan.leben | last post by:
I want to write a Mesh class using half-edges. This class uses three other classes: Vertex, HalfEdge and Face. These classes should be linked properly in the process of building up the mesh by...
15
by: Bob Johnson | last post by:
I have a base class that must have a member variable populated by, and only by, derived classes. It appears that if I declare the variable as "internal protected" then the base class *can*...
1
by: =?ISO-8859-2?Q?Gordan_Kre=B9i=E6?= | last post by:
I have classic interface/implementation paradigm. That does not work with stl containers :) Call to doAbstract(derivedList) yelds compilation error: sample.cpp: In function 'int main(int,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.