#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/bitmap.h"
#include "wx/button.h"
#include "wx/checkbox.h"
#include "wx/radiobox.h"
#include "wx/sizer.h"
#include "widgets.h"
-#if 1
+#if wxUSE_SPINBTN
#include "icons/spinbtn.xpm"
// ----------------------------------------------------------------------------
m_textMax = new wxTextCtrl(this, SpinBtnPage_MaxText, _T(""));
sizerRow->Add(m_textMax, 1, wxLEFT | wxALIGN_CENTRE_VERTICAL, 5);
- m_textMin->SetValue(wxString::Format(_T("%lu"), m_min));
- m_textMax->SetValue(wxString::Format(_T("%lu"), m_max));
+ m_textMin->SetValue( wxString::Format(_T("%d"), m_min) );
+ m_textMax->SetValue( wxString::Format(_T("%d"), m_max) );
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
val = valOld;
}
- m_sizerSpin->Remove(m_spinbtn);
- m_sizerSpin->Remove(m_spinctrl);
+ m_sizerSpin->Detach( m_spinbtn );
+ m_sizerSpin->Detach( m_spinctrl );
// there are 3 spacers left
- m_sizerSpin->Remove((int)0);
- m_sizerSpin->Remove((int)0);
- m_sizerSpin->Remove((int)0);
+ m_sizerSpin->Remove( 0 );
+ m_sizerSpin->Remove( 0 );
+ m_sizerSpin->Remove( 0 );
delete m_spinbtn;
delete m_spinctrl;
void SpinBtnWidgetsPage::OnSpinBtnUp(wxCommandEvent& event)
{
- wxLogMessage(_T("Spin button value incremented, will be %d (was %d)"),
- event.GetInt(), m_spinbtn->GetValue());
+ wxLogMessage( _T("Spin button value incremented, will be %ld (was %d)"),
+ event.GetInt(), m_spinbtn->GetValue() );
}
void SpinBtnWidgetsPage::OnSpinBtnDown(wxCommandEvent& event)
{
- wxLogMessage(_T("Spin button value decremented, will be %d (was %d)"),
- event.GetInt(), m_spinbtn->GetValue());
+ wxLogMessage( _T("Spin button value decremented, will be %ld (was %d)"),
+ event.GetInt(), m_spinbtn->GetValue() );
}
void SpinBtnWidgetsPage::OnSpinCtrl(wxCommandEvent& event)
wxLogMessage(_T("Spin control value changed, now %d"), value);
}
#endif
+ // wxUSE_SPINBTN