]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/controls/controls.cpp
fixed reference to wxEvtHandler
[wxWidgets.git] / samples / controls / controls.cpp
index 8fc5a7ca9f914790a01cd93a80f53132c5e74078..ca95765f7ba4d1ec49d8c1eb9592cb23e79505b4 100644 (file)
@@ -265,7 +265,7 @@ bool MyApp::OnInit()
     frame->Show(TRUE);
     frame->SetCursor(wxCursor(wxCURSOR_HAND));
 
     frame->Show(TRUE);
     frame->SetCursor(wxCursor(wxCURSOR_HAND));
 
-    frame->GetPanel()->m_notebook->SetSelection(6);
+    //frame->GetPanel()->m_notebook->SetSelection(6);
 
     SetTopWindow(frame);
 
 
     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");
 
                             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);
     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 );
                 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:
                 break;
             }
         case ID_LISTBOX_SEL_NUM:
@@ -1145,16 +1147,16 @@ void MyPanel::OnShowProgress( wxCommandEvent& WXUNUSED(event) )
 
 
     bool cont = TRUE;
 
 
     bool cont = TRUE;
-    for ( int i = 0; i < max && cont; i++ )
+    for ( int i = 0; i <= max && cont; i++ )
     {
         wxSleep(1);
     {
         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, "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
         {
         }
         else
         {
@@ -1218,12 +1220,15 @@ void MyFrame::OnQuit (wxCommandEvent& WXUNUSED(event) )
 
 void MyFrame::OnAbout( 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();
 
     wxMessageDialog dialog(this, "This is a control sample", "About Controls", wxOK );
     dialog.ShowModal();
-
-    wxEndBusyCursor();
 }
 
 void MyFrame::OnClearLog(wxCommandEvent& WXUNUSED(event))
 }
 
 void MyFrame::OnClearLog(wxCommandEvent& WXUNUSED(event))