Subcontrols not visible in custom control derived from another control
Posted
by Gacek
on Stack Overflow
See other posts from Stack Overflow
or by Gacek
Published on 2010-03-30T18:50:04Z
Indexed on
2010/03/30
18:53 UTC
Read the original article
Hit count: 373
c#
|custom-controls
I'm trying to create a custom control by deriving from a ZedGraphControl
I need to add a ProgressBar to the control, but I encountered some problems.
When I create a custom control and add both, ZedGraphCOntrol and ProgressBar to it, everything is OK:
MyCustomControl
{
ZedGraphControl
ProgressBar
}
All elemnets are visible and working as expected.
But I need to derive from ZGC and when I add a progress bar as a subcontrol of ZedGraphControl:
MyCustomControl : ZedGRaphControl
{
ProgressBar
}
The progress bar is not visible.
Is there any way to force the visibility of ProgressBar? Is it possible, that ZedGraphControl is not displaying its subcontrols? I tried do the same thing with a simple button and it's also not being displayed.
© Stack Overflow or respective owner