I m using wxPython 2.8 and i m trying to add scrollbar capabilities on the right side of a wx.Frame. This "right side" is a sizer; i have tried to use wx.ScrolledWindow but it seems to work only on wx.Frame. Do i have to add a wx.Panel on the client of the scrollbar ? How ? Is there an example ?
这是一部法典,其中一造“右”尺寸:
btnSizer = wx.GridSizer(6,num_art_per_riga)
for elemento in lista_elementi:
self.button = MyButton(self.scroll, elemento.descrizionebreve, elemento.descrizione, is_articolo)
self.button.Bind(wx.EVT_BUTTON , self.aggiungi_su_listbox)
btnSizer.Add(self.button, proportion=0, flag=wx.ALIGN_LEFT|wx.EXPAND, border=0)
btnSizer.Layout()
box = wx.StaticBox(self.scroll, -1, descrizione_box)
staticSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
staticSizer.Add(btnSizer)
self.toolbar.Add(staticSizer) # this is the sizer at the right side
self.scroll.SetVirtualSize((600, 400)) #this is the scroll !
Using this example the "toolbar" isn t displayed, nothing appears. The scroll is created using the following constructor:
self.scroll = wx.ScrolledWindow(self, -1)
如果自食不果。 小组。
感谢任何帮助