I am able to create a window with a menu and its sub-menus. However, I would like to create a single MenuButton on the right side. How do I do that?
menubar = Menu(self.parent)
self.parent.config(menu = menubar)
self.fileMenu = Menu(menubar)
self.fileMenu.add_command(label = "New")
menubar.add_cascade(label = "File", menu = self.fileMenu)
You can't do it. The menubar is a native widget that provides very little opportunity for customization.
just give spaces in the first label until it gets the distance desire.
add_command(label=" 'replace this quotes with all empty spaces' options")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.