I'd almost bet the bank that your Panel2 got added to the wrong parent
They should be both added to whatever parent control is appropriate, such
as:
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
You can check this with panel2.Parent in code or simply check in the
InitializeComponent method and inspect the Add methods to see where panel2
is being added. If it's being added to
this.panel1.Controls.Add(panel2);
then you'll never see it.
Chris R.
"JJ" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
Hi All,
I have 2 panels that have controls on them in a win
form. On Init of app I hide panel2 and show panel1, no
problem. On button Click I hide panel 1 and show panel 2,
panel 1 disappears but no panel 2 with controls showing.
Any idea what I might be doing wrong ?
Thanks,
JJ