Skip to content

Commit

Permalink
wxGUI/location_wizard: make TextCtrl widgets horizontally growable (O…
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi committed Dec 26, 2021
1 parent 886cb6e commit d2f6e16
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gui/wxpython/location_wizard/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -191,15 +192,15 @@ 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 = [
(grass.legal_name, self._nameValidationFailed),
(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("*")
Expand All @@ -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),
)
Expand All @@ -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),
)
Expand Down

0 comments on commit d2f6e16

Please sign in to comment.