]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/scroll/scroll.cpp
Fix recreating of wxBitmapComboBox using untyped client data.
[wxWidgets.git] / samples / scroll / scroll.cpp
index d8bc171f0640ea2872b4f0e6a5135b64918af5cb..a24dc49351e6f4eb45d314b1407e9110ad28938e 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        scroll.cpp
 // Purpose:     wxScrolled sample
 // Author:      Robert Roebling
-// RCS-ID:      $Id$
 // Copyright:   (C) 1998 Robert Roebling, 2002 Ron Lee, 2003 Matt Gregory
 //              (C) 2008 Vadim Zeitlin
 // Licence:     wxWindows licence
@@ -126,9 +125,9 @@ public:
         mbar->Append(menuFile, "&File");
         SetMenuBar( mbar );
 
-        Connect(wxID_DELETE, wxEVT_COMMAND_MENU_SELECTED,
+        Connect(wxID_DELETE, wxEVT_MENU,
                 wxCommandEventHandler(MyCanvasFrame::OnDeleteAll));
-        Connect(wxID_NEW, wxEVT_COMMAND_MENU_SELECTED,
+        Connect(wxID_NEW, wxEVT_MENU,
                 wxCommandEventHandler(MyCanvasFrame::OnInsertNew));
 
         Show();
@@ -797,7 +796,7 @@ MySizerScrolledWindow::MySizerScrolledWindow(wxWindow *parent)
     m_button = new wxButton( this, wxID_RESIZE_FRAME, "Press me",
                              wxDefaultPosition, SMALL_BUTTON );
 
-    sizer->Add(m_button, wxSizerFlags().Centre().Border(20));
+    sizer->Add(m_button, wxSizerFlags().Centre().Border(wxALL, 20));
     sizer->Add(new wxStaticText(this, wxID_ANY, "This is just"),
                wxSizerFlags().Centre());
     sizer->Add(new wxStaticText(this, wxID_ANY, "some decoration"),
@@ -809,7 +808,7 @@ MySizerScrolledWindow::MySizerScrolledWindow(wxWindow *parent)
 
     SetSizer( sizer );
 
-    Connect(wxID_RESIZE_FRAME, wxEVT_COMMAND_BUTTON_CLICKED,
+    Connect(wxID_RESIZE_FRAME, wxEVT_BUTTON,
             wxCommandEventHandler(MySizerScrolledWindow::OnResizeClick));
 }
 
@@ -1233,10 +1232,8 @@ MyAutoScrollingWindow::DCNormalize(int x, int y, int w, int h)
 void MyAutoScrollingWindow::OnDraw(wxDC& dc)
 {
     dc.SetFont(m_font);
-    wxBrush normBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)
-            , wxSOLID);
-    wxBrush selBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT)
-            , wxSOLID);
+    wxBrush normBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+    wxBrush selBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT));
     dc.SetPen(*wxTRANSPARENT_PEN);
     const wxString str = sm_testData;
     size_t strLength = str.length();