]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/spinbtn.cpp
allow adjusting the combo button size (patch 1489452)
[wxWidgets.git] / samples / widgets / spinbtn.cpp
index 96725bbce68e67d93a59e2f9f02d4790938658f4..a1ea73f112f079261e43266302c368d10bf28639 100644 (file)
@@ -73,11 +73,12 @@ enum
 class SpinBtnWidgetsPage : public WidgetsPage
 {
 public:
-    SpinBtnWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
+    SpinBtnWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
     virtual ~SpinBtnWidgetsPage(){};
 
     virtual wxControl *GetWidget() const { return m_spinbtn; }
     virtual wxControl *GetWidget2() const { return m_spinctrl; }
+    virtual void RecreateWidget() { CreateSpin(); }
 
 protected:
     // event handlers
@@ -167,7 +168,7 @@ END_EVENT_TABLE()
 
 IMPLEMENT_WIDGETS_PAGE(SpinBtnWidgetsPage, _T("Spin"));
 
-SpinBtnWidgetsPage::SpinBtnWidgetsPage(wxBookCtrl *book,
+SpinBtnWidgetsPage::SpinBtnWidgetsPage(wxBookCtrlBase *book,
                                        wxImageList *imaglist)
                   : WidgetsPage(book)
 {
@@ -268,7 +269,7 @@ void SpinBtnWidgetsPage::Reset()
 
 void SpinBtnWidgetsPage::CreateSpin()
 {
-    int flags = 0;
+    int flags = ms_defaultFlags;
 
     bool isVert = m_chkVert->GetValue();
     if ( isVert )
@@ -408,13 +409,13 @@ void SpinBtnWidgetsPage::OnSpinBtn(wxSpinEvent& event)
 
 void SpinBtnWidgetsPage::OnSpinBtnUp(wxSpinEvent& event)
 {
-    wxLogMessage( _T("Spin button value incremented, will be %ld (was %d)"),
+    wxLogMessage( _T("Spin button value incremented, will be %d (was %d)"),
                   event.GetInt(), m_spinbtn->GetValue() );
 }
 
 void SpinBtnWidgetsPage::OnSpinBtnDown(wxSpinEvent& event)
 {
-    wxLogMessage( _T("Spin button value decremented, will be %ld (was %d)"),
+    wxLogMessage( _T("Spin button value decremented, will be %d (was %d)"),
                   event.GetInt(), m_spinbtn->GetValue() );
 }