By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,590 Members | 1,140 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,590 IT Pros & Developers. It's quick & easy.

Custom Control inheriting from a Custom Control

P: n/a

My problem is that a custom control "newA" that inherits from a base
custom control "baseA" is not displaying any contained controls - that
were not inherited - at run time, but displays them fine at design

I'll give a short example:

public class baseA: UserControl
//add datagrid in designer and set some properties.

public class newA: baseA
//add a second grid and some buttons next to the existing datagrid in
the deisgner.
//programatically load second grid with data depending on records
selected on the first grid

public class main
//I put the newA control on my form programatically

What happens:
Altough newA looks fine in the designer when the program is run only
the grid from baseA shows up. I found that the controls are actually
present and working after setting a breakpoint; they are simply not
visible (the visible property is true of course).

Additional information:
My base class is not abstract because then the designer doens't work
anymore (makes sense, just not handy). The inherited controls
contained within the base are perfectly usable when designing newA.
The grid from the base is fully functional.

I have found people having similair problem but no solutions.

All help is appreciated.


Oct 26 '07 #1
Share this Question
Share on Google+
3 Replies

P: n/a
First thing I though of too ;)

I tried BrinToFront() and Visible=true at runtime, but to no avail.
Oct 29 '07 #2

P: n/a
On 2007-10-29 00:35:01 -0700, Cyr1dian
First thing I though of too ;)

I tried BrinToFront() and Visible=true at runtime, but to no avail.
Well, since it did turn out to be a dumb question, here's the standard
advice: post a concise-but-complete sample of code that reliably
reproduces the problem.

Given that you got no other replies, I suspect that's your best hope of
getting some useful information.


Oct 29 '07 #3

P: n/a
On 2007-10-29 02:25:00 -0700, Cyr1dian
Thanks for you help anyway ;)
You're welcome...even if all I did was ask a dumb question. :)

Oct 29 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.