I have the below window, which should simple have two output fields. The main output field (.output), should fill up most of the screen at the top, with .entry, and it's associated label at the bottom.
Instead, what I am told is happening is that .output is sitting in the top left corner of the window, although my frame seems to be filling up the rest of the screen.
Any thoughts?
Here is the code I'm using. Bits have been chopped out, because it's quite a lot otherwise, but it's all under the hood stuff, properties and amenu bar, which shouldn't impact the layout.
You are seting the sizer s to the frame in the line self.SetSizerAndFit(s), but not using a frame sizer, you need to set sizer s to the panel using self.panel.SetSizerAndFit(s) instead
Full runnable code
if name == ‘main’:
app = wx.App(False)
WorldFrame(None)
app.MainLoop()
``
···
On Wednesday, December 24, 2014 12:27:06 PM UTC, Chris Norman wrote:
Hi all, sorry for the vague subject.
I have the below window, which should simple have two output fields. The
main output field (.output), should fill up most of the screen at the
top, with .entry, and it’s associated label at the bottom.
Instead, what I am told is happening is that .output is sitting in the
top left corner of the window, although my frame seems to be filling up
the rest of the screen.
Any thoughts?
Here is the code I’m using. Bits have been chopped out, because it’s
quite a lot otherwise, but it’s all under the hood stuff, properties
and amenu bar, which shouldn’t impact the layout.
You are seting the sizer s to the frame in the line self.SetSizerAndFit(s) ,
but not using a frame sizer, you need to set sizer s to the
panel using self.panel.SetSizerAndFit(s) instead
Full *runnable* code
import wx
class WorldFrame(wx.Frame):
def
__init__(self,
filename=None):
super(WorldFrame, self).__init__(None)
self. panel