user interface - Having trouble adding wxListBox to frame -
I'm trying to add a wxListBox to his frame, but I am having some trouble.
This is my sample code
wx.Frame .__ init __ (self, parent, title = title, size = (750,690), style = wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx. CLOSE_BOX | wx.CLIP_CHILDREN) separator = wx.SplitterWindow (self) Panell = Panell (denominator) panel2 = wx.Panel (separator style = wx.SUNKEN_BORDER) splitter.SplitHorizontally (Panel1 , getting panel2,470) listbox = wx.ListBox (splitter, -1, (20, 20), (80, 120), 0, wx.LB_SINGLE)
I error Is, control .ListBox_swiginit (self, control .new_ListBox (* args, ** kwargs)) Writing error:. Hopefully wire sequence
Your line:
listbox = wx.ListBox (Separator, -1, (20, 20), (80, 120), 0, wx .LB_SINGLE)
Something like this should be:
listbox = w x.ListBox (Panel1, -1, (20, 20), (80, 120), wx.LB_SINGLE [list of options],)
this separator Use one of your panels instead of parenting, or if you want to split it out, use 'self' which is your frame.
You are on hardcoding sizes and positions, see examples or do a Google search.
Comments
Post a Comment