-
QuestionHi, I have not found information on how to pass arguments from an Event like Tkinter. If I set all the widgets as variable and a def for each the code is three times larger, can you apply this feature? Code sample# Flet
ft.IconButton(ft.icons.REFRESH, on_click=refrescar),
# Tkinter
Button(window, text="<-", command= lambda: cambiaVentana(0)) Error messageNo response ------------------------------------------------------
|
Beta Was this translation helpful? Give feedback.
Answered by
rkleivel
Aug 7, 2023
Replies: 1 comment 1 reply
-
Something like this?: import flet as ft
def main(page: ft.Page):
def refrescar(my_arg=None):
print(my_arg)
# perform your refresh actions
page.add(ft.IconButton(ft.icons.REFRESH, on_click=lambda _: refrescar(my_arg=123)))
ft.app(target=main) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Davidm16
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like this?: