]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/button.cpp
Spelling correction.
[wxWidgets.git] / samples / widgets / button.cpp
index 29e80d1b9257e99a1da10cce44ceaac955ac92be..d14df3ae57b82419e47770264e6a0548616c04af 100644 (file)
     #include "wx/textctrl.h"
 #endif
 
+#include "wx/artprov.h"
 #include "wx/sizer.h"
 
 #include "widgets.h"
-#if 1
+
 #include "icons/button.xpm"
 
 // ----------------------------------------------------------------------------
@@ -265,7 +266,7 @@ void ButtonWidgetsPage::CreateButton()
         size_t count = m_sizerButton->GetChildren().GetCount();
         for ( size_t n = 0; n < count; n++ )
         {
-            m_sizerButton->Remove(0);
+            m_sizerButton->Remove( 0 );
         }
 
         delete m_button;
@@ -279,7 +280,7 @@ void ButtonWidgetsPage::CreateButton()
     switch ( m_radioHAlign->GetSelection() )
     {
         case ButtonHAlign_Left:
-            flags |= wxALIGN_LEFT;
+            flags |= wxBU_LEFT;
             break;
 
         default:
@@ -287,18 +288,17 @@ void ButtonWidgetsPage::CreateButton()
             // fall through
 
         case ButtonHAlign_Centre:
-            flags |= wxALIGN_CENTRE_HORIZONTAL;
             break;
 
         case ButtonHAlign_Right:
-            flags |= wxALIGN_RIGHT;
+            flags |= wxBU_RIGHT;
             break;
     }
 
     switch ( m_radioVAlign->GetSelection() )
     {
         case ButtonVAlign_Top:
-            flags |= wxALIGN_TOP;
+            flags |= wxBU_TOP;
             break;
 
         default:
@@ -310,7 +310,7 @@ void ButtonWidgetsPage::CreateButton()
             break;
 
         case ButtonVAlign_Bottom:
-            flags |= wxALIGN_BOTTOM;
+            flags |= wxBU_BOTTOM;
             break;
     }
 
@@ -321,7 +321,7 @@ void ButtonWidgetsPage::CreateButton()
 #ifdef __WXUNIVERSAL__
     if ( m_chkImage->GetValue() )
     {
-        m_button->SetImageLabel(wxTheApp->GetStdIcon(wxICON_INFORMATION));
+        m_button->SetImageLabel(wxArtProvider::GetIcon(wxART_INFORMATION));
     }
 #endif // wxUniv
 
@@ -370,4 +370,3 @@ void ButtonWidgetsPage::OnButton(wxCommandEvent& event)
     wxLogMessage(_T("Test button clicked."));
 }
 
-#endif
\ No newline at end of file