Jan-25-2017, 03:42 PM
Aim is to pass some information to a panel when it is prepared.
I tried:
And if this way will not work, how can I send things into the panel during the creation process from a superordinated panel?
I tried:
class SizerPanel(wx.Panel): def __init__(self, parent, id, pos, size, style, setori, givenpanels): wx.Panel.__init__(self, parent, id, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.TAB_TRAVERSAL|wx.NO_BORDER, setori = wx.VERTICAL, givenpanels = ())in combination with
verti1pan = SizerPanel(self, id, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL|wx.NO_BORDER, setori = wx.VERTICAL, givenpanels = (panelOne, panelTwo))I got an error:
Error:Traceback (most recent call last):
File "...mehrpan01a.py", line 106, in <module>
frame = MainFrame()
File "....mehrpan01a.py", line 100, in __init__
panel = MainPanel(self)
File "...mehrpan01a.py", line 77, in __init__
givenpanels = (panelOne, panelTwo))
File "...mehrpan01a.py", line 47, in __init__
givenpanels = ())
File "...site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 68, in __init__
_windows_.Panel_swiginit(self,_windows_.new_Panel(*args, **kwargs))
TypeError: new_Panel() takes at most 6 arguments (7 given)
Aren't there 7 in the _init_: 1. parent, 2. id, 3. pos, 4. size, 5. style, 6. setori, 7. givenpanels?And if this way will not work, how can I send things into the panel during the creation process from a superordinated panel?