Skip to content

[Question] How to use arguments in on_click #3970

Closed Answered by vishnu-rvb
Dzheremi2 asked this question in Q&A
Discussion options

You must be logged in to vote

you can use lambda function.
on_click=lambda event:gen_line_inputs(page, lines_cnt) assuming page and lines_cnt will be kept static.
in case of dynamic arguments , assign values to your arguments and set them as defaults.
on_click=lambda event,page=page,lines_cnt=lines_cnt:gen_line_inputs(page, lines_cnt)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Dzheremi2
Comment options

@vishnu-rvb
Comment options

@Dzheremi2
Comment options

Answer selected by Dzheremi2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants