wxFrame or wxPanel?

When is it good to use a wxFrame versus a wxPanel?

I'm aware that a wxFrame may have any window placed on it, while a
wxPanel may be placed on any Window as well as have any control placed
on it.

If I declare a wxButton directly on a frame, it fills up the entire
Frame even when a size of say (20, 20) is specified. However, I'm
guessing that if a Panel was used, the control size would work as
expected.

Any Thoughts/Ideas/Experiences/Comments?

~= moxie =~

Chris Jackson wrote:

When is it good to use a wxFrame versus a wxPanel?

http://wiki.wxpython.org/index.cgi/Frequently_20Asked_20Questions#head-d51792183443254caf684bc90de41374f8f99722

I'm aware that a wxFrame may have any window placed on it, while a
wxPanel may be placed on any Window as well as have any control placed
on it.

Yes.

If I declare a wxButton directly on a frame, it fills up the entire
Frame even when a size of say (20, 20) is specified.

One of the behaviours of the wxFrame is that if it has only one child it will resize that child automatically to fill the entire client area of the frame.

http://wiki.wxpython.org/index.cgi/UsingSizers

However, I'm
guessing that if a Panel was used, the control size would work as
expected.

Yes, and the panel will be resized to fill the frame.

ยทยทยท

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