Visibility of a panel when created as child of wx.Notebook

Hi everyone,

I'm using the wx.Notebook control and using wx.Panel as the pages.
Now in our application user's have certain rights and some panels
will remain hidden for user's with insufficient rights. However,
these panels are created anyway (because their initialization code
is important, and interacts with the other panels. No, I did not
design this application), but are not necessarily added to the
Notebook.

However, creating a panel as a child of a wx.Notebook seems to create
the undesirable effect that its contents are drawn into the notebook.

The attached sample visualizes this. pan2 is created but not added
to the Notebook. Yet its contents (a part of the left button) are
visible and drawn over the tabs.

My question: Am I missing something or do I have to explicitly call
pan2.Hide() if I do not wish to have the window displayed?

cheers,
  Alex