Browse Source

bigfix: make checkbox honor gooey_options/label

1.0.4-release-candidate
Chris 4 years ago
parent
commit
342223c3dd
1 changed files with 6 additions and 1 deletions
  1. 7
      gooey/gui/components/widgets/checkbox.py

7
gooey/gui/components/widgets/checkbox.py

@ -20,7 +20,12 @@ class CheckBox(TextContainer):
self.help_text.SetMinSize((0,-1)) self.help_text.SetMinSize((0,-1))
layout = wx.BoxSizer(wx.VERTICAL) layout = wx.BoxSizer(wx.VERTICAL)
layout.Add(self.label)
if self._options.get('show_label', True):
layout.Add(self.label, 0, wx.EXPAND)
else:
self.label.Show(False)
layout.AddStretchSpacer(1)
layout.AddSpacer(2) layout.AddSpacer(2)
if self.help_text: if self.help_text:
hsizer = wx.BoxSizer(wx.HORIZONTAL) hsizer = wx.BoxSizer(wx.HORIZONTAL)

Loading…
Cancel
Save