0
I want to create a window in which to save and open a file in the menu bar, but it does not work
6 Respostas
+ 3
It does not work because you do not pass the function by reference:
fichier.add_command(label="Open",command=op())
You must spend the function like that:
fichier.add_command(label="Open",command=op)
The difference is:
1-command=op())#return none
2-command=op)#return function
The first only activates the function and Return null. But the second passes the address of memory and therefore passes the function itself instead of calling it:
This would be all:
https://code.sololearn.com/c9tmTRtVpFnw/?ref=app
+ 2
Me gusta tu codigo :)#español
I like your code.;)#english
0
thank you 😊
0
how can i do to wen i click in "afichage" it is open a photo
0
I can not help you with the photos, because I do not know much about Tkinter. But with the command yes I can, instead of using the function add_cascade(); Use the function add_command(); To the menu bar and so I added functionality.
The add_cascade () function; what it does is a drop-down menu, but the Add_Command () function; What it does is create a button in the menu bar.
0
oh ak thanks