How do i set the size of my listbox to be the same as my split window?
I tried to use sizer but because this is my first time using it and it did not work.please help. THANKS
class bucky(wx.Frame):
def __init__(self,parent,id):
wx.Frame.__init__(self,parent,id,'Frame aka window')
#panel=wx.Panel(self)
self.sp = wx.SplitterWindow(self)
self.p1 = wx.Panel(self.sp, style=wx.SUNKEN_BORDER)
self.p2 = stc.StyledTextCtrl(self.sp, style=wx.TE_MULTILINE)
self.p1.Hide()
self.sp.Initialize(self.p2)
self.p1.SetBackgroundColour("purple")
self.sp.SplitHorizontally(self.p2, self.p1, 350)
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.sizer.Add(self.p1, wx.EXPAND)
self.sizer.Fit(self)
mylist=['sex', 'toy', 'yx']
cunt=wx.ListBox(self.p1, -1, wx.DefaultPosition, self.sizer,mylist,wx.LB_SINGLE)
cunt.SetSelection(1)
if __name__=='__main__':
app=wx.PySimpleApp()
frame=bucky(parent=None,id=-1)
frame.Show()
app.MainLoop()