Skip to content Skip to sidebar Skip to footer

Python - Polymorphism In Wxpython, What's Wrong?

I am trying to write a simple custom button in wx.Python. My code is as follows, an error is thrown on line 19 of my 'Custom_Button.py' - What is going on? I can find no help onlin

Solution 1:

In function definitions, arguments with default values need to be listed after arguments without defaults, but before *args and **kwargs expansions

Before:

def__init__(self, parent, id=-1, NORM_BMP, PUSH_BMP, MOUSE_OVER_BMP, text="", 
                pos, size, **kwargs)

Corrected:

def__init__(self, parent, NORM_BMP, PUSH_BMP, MOUSE_OVER_BMP, 
                pos, size, id=-1, text="", **kwargs)

Post a Comment for "Python - Polymorphism In Wxpython, What's Wrong?"