Add an about button to the minimal sample for systems without menus.
On minimal ports like wxIOS no menus are available. Providing an about button allows at least a minimal user interaction in that case.
This commit is contained in:
@@ -164,6 +164,12 @@ MyFrame::MyFrame(const wxString& title)
|
|||||||
|
|
||||||
// ... and attach this menu bar to the frame
|
// ... and attach this menu bar to the frame
|
||||||
SetMenuBar(menuBar);
|
SetMenuBar(menuBar);
|
||||||
|
#else
|
||||||
|
// If menus are not available add a button to access the about box
|
||||||
|
wxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
wxButton* aboutBtn = new wxButton(this, wxID_ANY, "About...");
|
||||||
|
aboutBtn->Bind(wxEVT_BUTTON, &MyFrame::OnAbout, this);
|
||||||
|
sizer->Add(aboutBtn, wxSizerFlags().Center());
|
||||||
#endif // wxUSE_MENUS
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
|
Reference in New Issue
Block a user