One of the most important part in a GUI is a menubar, which are used to perform various operations on a Window. In this article we will learn how to create a menubar and add menu item to it. This can be achieved using MenuBar() constructor and Append() function in wx.MenuBar class.
Syntax for MenuBar() constructor:wx.MenuBar(style=0)
Syntax for Append() function:wx.MenuBar.Append(self, menu, title)
Parameter Input Type Description menu wx.Menu The menu to add. Do not deallocate this menu after calling Append . title string The title of the menu, must be non-empty.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course