468,456 Members | 1,840 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,456 developers. It's quick & easy.

Custom Control inheriting from a Custom Control

Hi,

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
time.

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.

grtz,
Cyr

Oct 26 '07 #1
3 1135
First thing I though of too ;)

I tried BrinToFront() and Visible=true at runtime, but to no avail.
Oct 29 '07 #2
On 2007-10-29 00:35:01 -0700, Cyr1dian
<Cy******@discussions.microsoft.comsaid:
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.

Pete

Oct 29 '07 #3
On 2007-10-29 02:25:00 -0700, Cyr1dian
<Cy******@discussions.microsoft.comsaid:
[...]
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.

Similar topics

reply views Thread by Andy Wynn | last post: by
3 posts views Thread by Nathan Laff | last post: by
1 post views Thread by a | last post: by
1 post views Thread by Abdo Haji-Ali | last post: by
reply views Thread by shapper | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by subhajit12345 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.