471,120 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,120 software developers and data experts.

Custom Control inheriting from a Custom Control


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
3 1204
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
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
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.

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

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.