User control disapear when added to a Panel
Posted
by dutt
on Stack Overflow
See other posts from Stack Overflow
or by dutt
Published on 2010-04-30T11:06:06Z
Indexed on
2010/04/30
11:17 UTC
Read the original article
Hit count: 138
I've got a user control class that works fine, drawing, events firing and the works. When i programmaticly add it to a class that extends from Panel it disapears. I've checked around and the line that makes it disapear is the line where i go
panel.Controls.Add(myuserControl).
Without that line the control works just fine, does anybody know why it won't show after the add? I'm currently doing the painting of the user control by overriding OnPaint, but the panel is using the default painting.
© Stack Overflow or respective owner