Page 1 of 1

image_button : function call no yet implemented

Posted: Mon Jul 10, 2017 9:37 pm
by buffalo
example:

Code: Select all

button_lock = thorpy.make_image_button(to_lock, to_lock_pressed, to_lock_hover, colorkey=False, func = call_lock)

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Code: Select all

TypeError: make_image_button() got an unexpected keyword argument 'func'

Re: image_button : function call no yet implemented

Posted: Tue Jul 11, 2017 9:03 am
by ThorPy
Hello,

Indeed, there is no func argument at the creation of an image_button.
You just have to do like this:

Code: Select all

my_button = ....
my_button.user_func = some_function
my_button.user_params = {"arg1":"something", ...}