Closed yctest9296 closed 4 years ago
Hi. This isn't supported directly, but can be easily worked around using lambda functions, like so:
def hello(sysTrayIcon, name):
print "Hello "+name
menu_options = (('Say Hello', "hello.ico", lambda sysTrayIcon: hello(sysTrayIcon, 'peter')),
('Say Hello', "hello.ico", lambda sysTrayIcon: hello(sysTrayIcon, 'jim')), ...
)
it is a quick question: how to pass parameter to menu option's function/command ? Thanks. like below: