def _do_layout(self): STD_LAYOUT = (0, wx.LEFT | wx.RIGHT | wx.EXPAND, PADDING) container = wx.BoxSizer(wx.VERTICAL) container.AddSpacer(15) if self.title: container.Add(wx_util.h0(self, self.title), 0, wx.LEFT | wx.RIGHT, PADDING) container.AddSpacer(30) if self.widgets.required_args: container.Add(wx_util.h1(self, i18n._("required_args_msg")), 0, wx.LEFT | wx.RIGHT, PADDING) container.AddSpacer(5) container.Add(wx_util.horizontal_rule(self), *STD_LAYOUT) container.AddSpacer(20) self.CreateComponentGrid(container, self.widgets.required_args, cols=self._num_req_cols) container.AddSpacer(10) if self.widgets.optional_args: # container.AddSpacer(10) container.Add(wx_util.h1(self, i18n._("optional_args_msg")), 0, wx.LEFT | wx.RIGHT, PADDING) container.AddSpacer(5) container.Add(wx_util.horizontal_rule(self), *STD_LAYOUT) container.AddSpacer(20) self.CreateComponentGrid(container, self.widgets.optional_args, cols=self._num_opt_cols) self.SetSizer(container)
def layout(self, num_columns): STD_LAYOUT = (0, wx.LEFT | wx.RIGHT | wx.EXPAND, PADDING) if self.title: self.container.Add(wx_util.h0(self, self.title), 0, wx.LEFT | wx.RIGHT, PADDING) self.container.AddSpacer(30) if self.widgets: self.container.Add(wx_util.h1(self, self.section_name), 0, wx.LEFT | wx.RIGHT, PADDING) self.container.AddSpacer(5) self.container.Add(wx_util.horizontal_rule(self), *STD_LAYOUT) self.container.AddSpacer(20) self.create_component_grid(self.container, self.widgets, cols=num_columns) self.container.AddSpacer(10)
def layout(self): STD_LAYOUT = (0, wx.LEFT | wx.RIGHT | wx.EXPAND, PADDING) if self.title: self.container.Add(wx_util.h0(self, self.title), 0, wx.LEFT | wx.RIGHT, PADDING) self.container.AddSpacer(30) if self.widgets: self.container.Add(wx_util.h1(self, self.section_name), 0, wx.LEFT | wx.RIGHT, PADDING) self.container.AddSpacer(5) self.container.Add(wx_util.horizontal_rule(self), *STD_LAYOUT) self.container.AddSpacer(20) self.create_component_grid(self.container, self.widgets, cols=2) self.container.AddSpacer(10)