NullRefException on panel.Show()...

  • Thread starter Thread starter Paul Colton
  • Start date Start date
P

Paul Colton

I have some hidden panels that have been added to a parent panel (.Hide()
called, then added to parent panel).

When I Show() the hidden panel for the first time, I get a
NullReferenceException in SetVisibleCore(). If I catch the exception and
Show() again, everything works fine.

I've tried CreateControl() but still get the error. Any suggestions?

Paul
 
* "Paul Colton said:
I have some hidden panels that have been added to a parent panel (.Hide()
called, then added to parent panel).

When I Show() the hidden panel for the first time, I get a
NullReferenceException in SetVisibleCore(). If I catch the exception and
Show() again, everything works fine.

I've tried CreateControl() but still get the error. Any suggestions?

Short but complete programs
<http://www.yoda.arachsys.com/csharp/complete.html>
 
Ok, i'll try to come up with an example. i've tried one but could not
reproduce. i'll try a little bit more complex example and post it here.
 
Back
Top