I want to be able to have a set of panels of vertical panels that remain the same size, but I want to have a vertical scroll bar that will allow me to scroll in the window. Right now I'm using a wx.ScrolledPanel and adding panels to that and putting them in the sizer but nothing really shows up on the screen
import wx
import wx.lib.scrolledpanel as scrolled
class josh(wx.Frame):
def __init__(self, parent, id):
wx.Frame.__init__(self, wx.GetApp().TopWindow, title='Title',size=(800,600))
arr= ['Q1.......','Q2.......','Q3.......','Q4.......','Q5.......','Q6.......','Q7..............','Q8..........']
scroll=scrolled.ScrolledPanel(self, -1)
#scroll.SetScrollbars(1,1,1,1)
panelList = []
commentList = []
count = 1
sizer = wx.BoxSizer(wx.VERTICAL)
for p in arr:
panelList.append(wx.Panel(scroll ,-1, size = (800,100), style=wx.SUNKEN_BORDER))
sizer.Add(panelList[count-1], 1, wx.EXPAND)
wx.StaticText(panelList[count-1], -1, str(count), (5, 50), wx.DefaultSize)
commentList.append( wx.TextCtrl(panelList[count-1], style=wx.TE_MULTILINE,pos=(500, 20),size = (200,50)))
count+=1
self.SetAutoLayout(True)
self.SetSizer(sizer)
scroll.SetupScrolling()
if __name__=='__main__':
app=wx.App(False)
frame=josh(parent=None,id=-1)
frame.Show()
app.MainLoop()