Menus & toolbars === ## **Simple menu** 若選單沒有正常顯示,將`wx.ID_EXIT`改成`APP_EXIT`,並在全域`APP_EXIT = 1`再執行一次試試 ```python Icons and shortcutfileItem = fileMenu.Append(wx.ID_EXIT, 'Quit', 'Quit application') ``` ### APP\_EXSubmenus and separators 若選單沒有正常顯示,將`wx.ID_EXIT`改成`APP_EXIT`,並在全域`APP_EXIT = 1`再執行一次試試 ```python qmi = wx.MenuItem(fileMenu, wx.ID_EXIT, '&Quit\tCtrl+W') ``` 畫出分隔線: ```python fileMenu.AppendSeparator() ```   ### Ref. [Menus and toolbars](http://puremonkey2010.blogspot.com/2019/04/python-wxpython-menus-and-toolbars.html) [https://zetcode.com/wxpython/menustoolbars/](https://zetcode.com/wxpython/menustoolbars/) [https://www.cnblogs.com/Twobox/p/7399871.html](https://www.cnblogs.com/Twobox/p/7399871.html) ###### tags: `wxPython`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up