[wxPython] idea behind wxPanel

I know that this is probably about as ignorant a question as can be asked on this list, but could somebody explain to me the philosophy behind wxPanel? If I’ve got a frame with a menu, and I want to put a couple of buttons on it, why do I need to first create a wxPanel and then put the buttons on that? What is the purpose of this added complication?

Quite often, you don't have to. However, I've noticed that on Windows
NT/2000, the background color of a frame is dark grey, whereas a panel gives
you the standard window color (the same as the buttons). Also panels give
you an extra bit of flexibility - for instance sometimes I'll make a standard
panel and then use it in a dialog or a tabbed notebook, depending on the
context.

···

On Monday 27 August 2001 12:48, you wrote:

I know that this is probably about as ignorant a question as can be asked
on this list, but could somebody explain to me the philosophy behind
wxPanel? If I've got a frame with a menu, and I want to put a couple of
buttons on it, why do I need to first create a wxPanel and then put the
buttons on that? What is the purpose of this added complication?

--
Cliff Wells
Software Engineer
Logiplex Corporation
(800) 735-0555

[no html mail here please]

The wxFrame is meant to be a container of one or more windows that (usually)
completly fill its client area. wxPanel is designed to be a container for
controls or other windows that don't completely cover it, so it knows how to
paint itself with the system panel colour. It also adds navigation key
support such as TABs.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!