Edit frame doesn't fit to parent size

Hallöchen!

Christian Kristukat writes:

Torsten Bronger <bronger <at> physik.rwth-aachen.de> writes:

    def open_file(self, filename):
        self.filename = os.path.abspath(filename)
        if not self.editor:
            self.editor = Editor(self)
        self.editor.LoadFile(self.filename)

I'm not on windows, but I think putting a self.Layout() here might
work.

Unfortunately, neither self.editor.Layout() nor self.Layout() does
the trick.

Tschö,
Torsten.

···

--
Torsten Bronger, aquisgrana, europa vetus
                                                    ICQ 264-296-646
                   (See http://ime.webhop.org for Jabber, MSN, etc.)

Hallöchen!

Christian Kristukat writes:

> Torsten Bronger <bronger <at> physik.rwth-aachen.de> writes:
>
>> def open_file(self, filename):
>> self.filename = os.path.abspath(filename)
>> if not self.editor:
>> self.editor = Editor(self)
>> self.editor.LoadFile(self.filename)
>
> I'm not on windows, but I think putting a self.Layout() here might
> work.

Unfortunately, neither self.editor.Layout() nor self.Layout() does
the trick.

self.Layout() doesn't work because you don't have a sizer, you're
relying on the implicit sizing that wx.Frame provides. wx.Frames
implicit sizing only happens in response to EVT_SIZE events. I'm
actually rather suprised this works on linux, somewhere in the
toolchain something thinks that you need to be resized when you add a
child (this is probably within Gtk itself). This is actually a pretty
reasonable asumption, you might consider adding a feature request on
the wx tracker for it.

In the meantime, wx.Frame provides a convenience method for solving
exactly this problem - wx.Frame.SendSizeEvent()

···

On 12/4/06, Torsten Bronger <bronger@physik.rwth-aachen.de> wrote:

Tschö,
Torsten.

--
Torsten Bronger, aquisgrana, europa vetus
                                                    ICQ 264-296-646
                   (See http://ime.webhop.org for Jabber, MSN, etc.)

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org