[wxPython-users] Shaped window problem

Robin Dunn robin at alldunn.com
Fri Feb 1 08:35:50 PST 2008


Michele "O-Zone" Pinassi wrote:
> Hi all,
> i've a strange problem with a shaped window. The code is there:
> 
> http://pastebin.com/m2cacdf5e
> 
> If i remove the QUIT_Button lines from the sources, all works. If i try to add 
> a button all the frame will be covered by the button in the top-left corner 
> and a gray mask.
> 
> Someone can help me doing the right thing (have only the button) ?

If a frame has only 1 child widget then it will assume that you want it 
to fill the client area of the frame and will automatically resize and 
position it so that is true.  If you don't want it to fill the frame 
then you either need to use a sizer, or catch the frame's EVT_SIZE event 
and manage the size and position of the child yourself in the handler.

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





More information about the wxpython-users mailing list