]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/controls/controls.cpp
no message
[wxWidgets.git] / samples / controls / controls.cpp
index cb18539d48c6b07aeefce583ca127de539f59131..76e0fdf31f678afa2c8dc1a3f02a42c08ffd4b1e 100644 (file)
@@ -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,7 @@ 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"));
+    // wxLog::AddTraceMask(_T("focus"));
     m_logTargetOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_text));
 
     m_notebook = new wxNotebook(this, ID_NOTEBOOK);
@@ -635,8 +635,11 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
 #ifdef __WXMSW__
     // test for masked bitmap display
     bitmap = wxBitmap("test2.bmp", wxBITMAP_TYPE_BMP);
-    bitmap.SetMask(new wxMask(bitmap, *wxBLUE));
-    (void)new wxStaticBitmap /* wxBitmapButton */ (panel, -1, bitmap, wxPoint(300, 120));
+    if (bitmap.Ok())
+    {
+       bitmap.SetMask(new wxMask(bitmap, *wxBLUE));
+       (void)new wxStaticBitmap /* wxBitmapButton */ (panel, -1, bitmap, wxPoint(300, 120));
+    }
 #endif
 
     wxBitmap bmp1(wxTheApp->GetStdIcon(wxICON_INFORMATION)),
@@ -829,6 +832,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: