dontpanic92 / wxGo

Golang wxWidgets Wrapper
Other
403 stars 51 forks source link

Set program name for OS X menu bar #39

Closed spieglt closed 6 years ago

spieglt commented 6 years ago

I'm trying to include a very basic menu bar, mostly just to be able to quit with Command-Q on OS X. The main menu has the title of my program, but the items under the menu say "Quit Wxgo" and "Hide Wxgo". How do I make it say "Quit MyProgram"? Attached is a picture of how it looks from the aui.go sample.

screen shot 2017-11-10 at 3 01 07 pm

dontpanic92 commented 6 years ago

When calling the wx.NewApp(), please pass the program name that you want to show in the menubar, e.g. wx.NewApp("AUI App")

spieglt commented 6 years ago

Thanks, that works, though it does make the second word lowercase. Any way to preserve casing? And how should I have found that functionality? I've been trying to just reference the wxWidgets documentation, but I don't see that argument in the constructor for the App class reference: http://docs.wxwidgets.org/3.1/classwx_app.html. Is this something specific to wxGo?

dontpanic92 commented 6 years ago

I'm not very familiar with macOS, so I can't give you an answer about the casing issue. And for the feature, actually it's a specific feature of wxGo, and we are indeed lack of documents about these things for now. I will try to make our wiki richer.

spieglt commented 6 years ago

Much appreciated. Don't want to bother you with questions I can answer myself so just wanted to make sure I wasn't missing something.