X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aec18ff785687e1d0830da8cd287903128a994c6..6344162a81f74b3fbab0803405eebc0c0b83e797:/samples/widgets/radiobox.cpp diff --git a/samples/widgets/radiobox.cpp b/samples/widgets/radiobox.cpp index e474cbc172..ef45264175 100644 --- a/samples/widgets/radiobox.cpp +++ b/samples/widgets/radiobox.cpp @@ -28,6 +28,7 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/bitmap.h" #include "wx/button.h" #include "wx/checkbox.h" #include "wx/radiobox.h" @@ -65,8 +66,8 @@ enum }; // default values for the number of radiobox items -static const size_t DEFAULT_NUM_ENTRIES = 12; -static const size_t DEFAULT_MAJOR_DIM = 3; +static const unsigned int DEFAULT_NUM_ENTRIES = 12; +static const unsigned int DEFAULT_MAJOR_DIM = 3; // ---------------------------------------------------------------------------- // RadioWidgetsPage @@ -272,8 +273,8 @@ RadioWidgetsPage::~RadioWidgetsPage() void RadioWidgetsPage::Reset() { - m_textMajorDim->SetValue(wxString::Format(_T("%d"), DEFAULT_MAJOR_DIM)); - m_textNumBtns->SetValue(wxString::Format(_T("%d"), DEFAULT_NUM_ENTRIES)); + m_textMajorDim->SetValue(wxString::Format(_T("%u"), DEFAULT_MAJOR_DIM)); + m_textNumBtns->SetValue(wxString::Format(_T("%u"), DEFAULT_NUM_ENTRIES)); m_textLabel->SetValue(_T("I'm a radiobox")); m_textLabelBtns->SetValue(_T("item")); @@ -288,7 +289,7 @@ void RadioWidgetsPage::CreateRadio() { sel = m_radio->GetSelection(); - m_sizerRadio->Remove(m_radio); + m_sizerRadio->Detach( m_radio ); delete m_radio; } @@ -320,7 +321,8 @@ void RadioWidgetsPage::CreateRadio() wxString labelBtn = m_textLabelBtns->GetValue(); for ( size_t n = 0; n < count; n++ ) { - items[n] = wxString::Format(_T("%s %u"), labelBtn.c_str(), n + 1); + items[n] = wxString::Format(_T("%s %lu"), + labelBtn.c_str(), (unsigned long)n + 1); } int flags = m_chkVert->GetValue() ? wxRA_VERTICAL