Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI/location_wizard: make TextCtrl widgets horizontally growable #2026

Merged
merged 1 commit into from
Dec 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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