X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4080c40a71a40c54798f2681e22c7cc4701ace07..29ea4a290850e9ae79c258774fa22153a951ff7f:/samples/controls/controls.cpp diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 4df2c078f7..b771b00a5e 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -164,18 +164,11 @@ bool MyApp::OnInit() frame->SetIcon( wxICON(mondrian) ); - // submenu - wxMenu *sub_menu = new wxMenu( wxMENU_TEAROFF ); - sub_menu->Append(MINIMAL_ABOUT, "&About", "About this sample"); - sub_menu->Append(MINIMAL_ABOUT, "&About", "About this sample"); - sub_menu->Append(MINIMAL_ABOUT, "&About", "About this sample"); - - wxMenu *file_menu = new wxMenu; + wxMenu *file_menu = new wxMenu( wxMENU_TEAROFF ); file_menu->Append(MINIMAL_ABOUT, "&About\tF1"); file_menu->Append(MINIMAL_QUIT, "E&xit\tAlt-X", "Quit controls sample"); - file_menu->Append( 0, "&Submenu", sub_menu ); - wxMenuBar *menu_bar = new wxMenuBar( wxMB_DOCKABLE ); + wxMenuBar *menu_bar = new wxMenuBar; menu_bar->Append(file_menu, "&File"); #if wxUSE_TOOLTIPS @@ -757,7 +750,7 @@ void MyPanel::OnShowProgress( wxCommandEvent& WXUNUSED(event) ) "An informative message", max, // range this, // parent - wxPD_CAN_ABORT | wxPD_APP_MODAL); + wxPD_CAN_ABORT | wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME); bool cont = TRUE; @@ -776,7 +769,6 @@ void MyPanel::OnShowProgress( wxCommandEvent& WXUNUSED(event) ) { cont = dialog.Update(i); } - wxYield(); } if ( !cont )