[wxPython-users] ActiveX_IEHtmlWindow resize problem
Robin Dunn
robin at alldunn.com
Fri Sep 14 16:49:36 PDT 2007
Mike Driscoll wrote:
> Hi,
>
> I must be doing something really dumb with this ActiveX_IEHtmlWindow
> control. I want to embed it in my program, but when I do, I find that it
> won't resize correctly. The frame resizes fine, but the
> ActiveX_IEHtmlWindow only stays at some default size and doesn't redraw
> itself or something. I've included a sample of what I am doing.
The problem is that you are making a panel as the child of the frame,
and the notebook as the child of the panel (so far so good) but you are
putting the notebook in the sizer and assigning the sizer to the frame.
So it is trying to manage the layout of the notebook as if it is the
child of the frame, but it is not. The notebook is being clipped by the
panel, and there is nothing in your code to change its size to match the
frame.
Simply changing:
self.frame.SetSizer(mainSizer)
mainSizer.Fit(self.frame)
to:
self.panel.SetSizer(mainSizer)
self.panel.Layout()
takes care of the problem. This makes the frame have no sizer and so it
will fall back to its built-in functionality of resizing its only child
(the panel) to fill the client area.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list