def create_properties(self): TopLevelBase.create_properties(self) prop = self.properties panel = wx.ScrolledWindow(self.notebook, -1, style=wx.TAB_TRAVERSAL) prop['title'].display(panel) prop['icon'].display(panel) prop['centered'].display(panel) prop['sizehints'].display(panel) prop['menubar'].display(panel) prop['toolbar'].display(panel) try: sbprop = prop['statusbar'] sbprop.display(panel) except KeyError: sbprop = None prop['style'].display(panel) szr = wx.BoxSizer(wx.VERTICAL) szr.Add(prop['title'].panel, 0, wx.EXPAND) szr.Add(prop['icon'].panel, 0, wx.EXPAND) szr.Add(prop['centered'].panel, 0, wx.EXPAND) szr.Add(prop['sizehints'].panel, 0, wx.EXPAND) szr.Add(prop['menubar'].panel, 0, wx.EXPAND) szr.Add(prop['toolbar'].panel, 0, wx.EXPAND) if sbprop: szr.Add(sbprop.panel, 0, wx.EXPAND) szr.Add(prop['style'].panel, 0, wx.EXPAND) panel.SetAutoLayout(True) panel.SetSizer(szr) szr.Fit(panel) self.notebook.AddPage(panel, 'Widget') w, h = panel.GetClientSizeTuple() panel.SetScrollbars(5, 5, int(math.ceil(w / 5.0)), int(math.ceil(h / 5.0)))
def create_properties(self): TopLevelBase.create_properties(self) prop = self.properties panel = wx.ScrolledWindow(self.notebook, -1, style=wx.TAB_TRAVERSAL) prop['title'].display(panel) prop['icon'].display(panel) prop['centered'].display(panel) prop['sizehints'].display(panel) prop['menubar'].display(panel) prop['toolbar'].display(panel) try: sbprop = prop['statusbar'] sbprop.display(panel) except KeyError: sbprop = None prop['style'].display(panel) szr = wx.BoxSizer(wx.VERTICAL) szr.Add(prop['title'].panel, 0, wx.EXPAND) szr.Add(prop['icon'].panel, 0, wx.EXPAND) szr.Add(prop['centered'].panel, 0, wx.EXPAND) szr.Add(prop['sizehints'].panel, 0, wx.EXPAND) szr.Add(prop['menubar'].panel, 0, wx.EXPAND) szr.Add(prop['toolbar'].panel, 0, wx.EXPAND) if sbprop: szr.Add(sbprop.panel, 0, wx.EXPAND) szr.Add(prop['style'].panel, 0, wx.EXPAND) panel.SetAutoLayout(True) panel.SetSizer(szr) szr.Fit(panel) self.notebook.AddPage(panel, 'Widget') w, h = panel.GetClientSizeTuple() panel.SetScrollbars(5, 5, int(math.ceil(w/5.0)), int(math.ceil(h/5.0)))
def create_properties(self): TopLevelBase.create_properties(self) panel = wx.ScrolledWindow(self.notebook, -1, style=wx.TAB_TRAVERSAL) szr = wx.BoxSizer(wx.VERTICAL) self.properties['title'].display(panel) self.properties['icon'].display(panel) self.properties['centered'].display(panel) self.properties['style'].display(panel) szr.Add(self.properties['title'].panel, 0, wx.EXPAND) szr.Add(self.properties['icon'].panel, 0, wx.EXPAND) szr.Add(self.properties['centered'].panel, 0, wx.EXPAND) szr.Add(self.properties['style'].panel, 0, wx.EXPAND) panel.SetAutoLayout(True) panel.SetSizer(szr) szr.Fit(panel) self.notebook.AddPage(panel, 'Widget') w, h = panel.GetClientSizeTuple() panel.SetScrollbars(5, 5, int(math.ceil(w/5.0)), int(math.ceil(h/5.0)))
def create_properties(self): TopLevelBase.create_properties(self) panel = wx.ScrolledWindow(self.notebook, -1, style=wx.TAB_TRAVERSAL) szr = wx.BoxSizer(wx.VERTICAL) self.properties['title'].display(panel) self.properties['icon'].display(panel) self.properties['centered'].display(panel) self.properties['style'].display(panel) szr.Add(self.properties['title'].panel, 0, wx.EXPAND) szr.Add(self.properties['icon'].panel, 0, wx.EXPAND) szr.Add(self.properties['centered'].panel, 0, wx.EXPAND) szr.Add(self.properties['style'].panel, 0, wx.EXPAND) panel.SetAutoLayout(True) panel.SetSizer(szr) szr.Fit(panel) self.notebook.AddPage(panel, 'Widget') w, h = panel.GetClientSizeTuple() panel.SetScrollbars(5, 5, int(math.ceil(w / 5.0)), int(math.ceil(h / 5.0)))