X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9bb3479c68dd8e6cde9c997f4221fc5cfc5ca110..9dff41820aec1547886cde342ce8f7834ebbcd0b:/samples/controls/controls.cpp?ds=inline diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 8fc5a7ca9f..ca95765f7b 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -265,7 +265,7 @@ bool MyApp::OnInit() frame->Show(TRUE); frame->SetCursor(wxCursor(wxCURSOR_HAND)); - frame->GetPanel()->m_notebook->SetSelection(6); + //frame->GetPanel()->m_notebook->SetSelection(6); SetTopWindow(frame); @@ -395,7 +395,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) wxPoint(0, 250), wxSize(100, 50), wxTE_MULTILINE); m_text->SetBackgroundColour("wheat"); - wxLog::AddTraceMask(_T("focus")); + if ( 0 ) + wxLog::AddTraceMask(_T("focus")); m_logTargetOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_text)); m_notebook = new wxNotebook(this, ID_NOTEBOOK); @@ -832,6 +833,7 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event ) m_lbSelectThis->Enable( event.GetInt() == 0 ); m_lbSelectNum->Enable( event.GetInt() == 0 ); m_listboxSorted->Enable( event.GetInt() == 0 ); + FindWindow(ID_CHANGE_COLOUR)->Enable( event.GetInt() == 0 ); break; } case ID_LISTBOX_SEL_NUM: @@ -1145,16 +1147,16 @@ void MyPanel::OnShowProgress( wxCommandEvent& WXUNUSED(event) ) bool cont = TRUE; - for ( int i = 0; i < max && cont; i++ ) + for ( int i = 0; i <= max && cont; i++ ) { wxSleep(1); - if ( i == max - 1 ) + if ( i == max ) { cont = dialog.Update(i, "That's all, folks!"); } else if ( i == max / 2 ) { - cont = dialog.Update(i, "Only a half left!"); + cont = dialog.Update(i, "Only a half left (very long message)!"); } else { @@ -1218,12 +1220,15 @@ void MyFrame::OnQuit (wxCommandEvent& WXUNUSED(event) ) void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) ) { - wxBeginBusyCursor(); + wxBusyCursor bc; + +#if 0 // VZ: my temp test code, will remove + wxGetTextFromUser("msg", "caption", "val", this); + return; +#endif // 0 wxMessageDialog dialog(this, "This is a control sample", "About Controls", wxOK ); dialog.ShowModal(); - - wxEndBusyCursor(); } void MyFrame::OnClearLog(wxCommandEvent& WXUNUSED(event))