From cdb6755d74b3730888b6d0526811bbfe0509390a Mon Sep 17 00:00:00 2001 From: Tomas Zigo Date: Tue, 21 Dec 2021 05:50:23 +0100 Subject: [PATCH] wxGUI/location_wizard: make TextCtrl widgets horizontally growable --- gui/wxpython/location_wizard/wizard.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gui/wxpython/location_wizard/wizard.py b/gui/wxpython/location_wizard/wizard.py index 193bae15a61..77b570a14df 100644 --- a/gui/wxpython/location_wizard/wizard.py +++ b/gui/wxpython/location_wizard/wizard.py @@ -180,6 +180,7 @@ def __init__(self, wizard, parent, grassdatabase): self.sizer = wx.GridBagSizer(vgap=0, hgap=0) self.sizer.SetCols(5) self.sizer.SetRows(8) + self.sizer.AddGrowableCol(1) # definition of variables self.grassdatabase = grassdatabase @@ -191,7 +192,7 @@ def __init__(self, wizard, parent, grassdatabase): # text controls self.tgisdbase = self.MakeLabel(grassdatabase) - self.tlocation = self.MakeTextCtrl("newLocation", size=(400, -1)) + self.tlocation = self.MakeTextCtrl("newLocation") self.tlocation.SetFocus() checks = [ @@ -199,7 +200,7 @@ def __init__(self, wizard, parent, grassdatabase): (self._checkLocationNotExists, self._locationAlreadyExists), ] self.tlocation.SetValidator(GenericMultiValidator(checks)) - self.tlocTitle = self.MakeTextCtrl(size=(400, -1)) + self.tlocTitle = self.MakeTextCtrl() # text for required options required_txt = self.MakeLabel("*") @@ -226,7 +227,7 @@ def __init__(self, wizard, parent, grassdatabase): ) self.sizer.Add( self.tlocation, - flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL, + flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL | wx.EXPAND, border=5, pos=(2, 1), ) @@ -248,7 +249,7 @@ def __init__(self, wizard, parent, grassdatabase): ) self.sizer.Add( self.tlocTitle, - flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL, + flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL | wx.EXPAND, border=5, pos=(4, 1), )