Reputation: 1539
I know how to create and set menus for tkinter Toplevel windows, but I'm struggling to find any information on how to get a window's menu bar. What I'd like to do is dynamically add options to the menu, so I need to do something like:
menubar = self.getMenu()
menubar.add_cascade(...)
Where self
is a Toplevel window. Thanks!
Upvotes: 0
Views: 176
Reputation: 386020
You want to use the cget method, which can be used to get any of the configured options:
menu = self.cget("menu")
Upvotes: 1