ammar azif wrote:
> Hi,
>
> Thanks for the help guys.
>
>
> I have tried gui programming using Tkinter and use the
Button class
> which accepts the command argument which is a function
object.
>
> The question is how to send arguments if the function
accepts arguments.
A common way to do this is to use a lambda expression to
bind the
arguments, e.g.
Button(..., command = lambda: func_with_args(1, 2, 3))
For example see
http://ww
w.daniweb.com/code/snippet610.html
You could also define explicit, short helper functions if
you don't want
to use lambdas.
Kent
_______________________________________________
Tutor maillist - Tutor python.org
http://
mail.python.org/mailman/listinfo/tutor
|