+ 1

MenuButton in tkinter Python

While creating a proper menu we use many statements and one of the statements is : menubutton["menu"] = menubutton.menu What is the significance of this statement ? Does the "menu" in square brackets can be replaced by any identifier ? https://code.sololearn.com/clGX1oTmXtfS (This code has used many times menu keyword but I am not able to understand the significance of each one as some of them are explained online but some of them are just written)

27th Jun 2019, 6:25 AM
harshit
harshit - avatar
2 Réponses
+ 2
Diego please see this.
27th Jun 2019, 8:15 PM
harshit
harshit - avatar
+ 1
It basically enables the dropdown menu. Remove that part and see what happens. It can't be repacled by any identifier. It needs to be ["menu"]. https://stackoverflow.com/questions/44822870#44824611
28th Jun 2019, 4:32 AM
Diego
Diego - avatar