From 95d7f0fa1ead9119b04e6691ef4c26de7ba93774 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Fri, 29 May 2015 23:03:32 +0200 Subject: [PATCH] Configtool: resize the window properly. This means, including the background panel and background picture. --- configtool.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configtool.py b/configtool.py index ccb5c36..f483d79 100755 --- a/configtool.py +++ b/configtool.py @@ -45,6 +45,7 @@ class ConfigFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, "Teacup Configtool", size = (880, 550)) self.Bind(wx.EVT_CLOSE, self.onClose) + self.Bind(wx.EVT_SIZE, self.onResize) self.deco = Decoration() @@ -81,6 +82,7 @@ class ConfigFrame(wx.Frame): self.nb.AddPage(self.pgBoard, self.boardBaseText) panel.Fit() + self.panel = panel sz.Add(self.nb, 1, wx.EXPAND + wx.ALL, 5) self.SetSizer(sz) @@ -95,6 +97,11 @@ class ConfigFrame(wx.Frame): self.Destroy() + def onResize(self, evt): + self.panel.SetSize(self.GetClientSize()) + self.Refresh() + evt.Skip(); + def setPrinterTabFile(self, fn): self.printerFileName = fn self.updatePrinterTab()