-
-}
-
-bool wxRadioBox::Show(bool show)
-{
- if ( !wxControl::Show(show) )
- return FALSE;
-
- int nCmdShow = show ? SW_SHOW : SW_HIDE;
- for ( int i = 0; i < m_noItems; i++ )
- {
- ::ShowWindow((HWND)m_radioButtons[i], nCmdShow);
- }
-
- return TRUE;
-}
-
-// Enable a specific button
-void wxRadioBox::Enable(int item, bool enable)
-{
- wxCHECK_RET( item >= 0 && item < m_noItems,
- wxT("invalid item in wxRadioBox::Enable()") );
-
- ::EnableWindow((HWND) m_radioButtons[item], enable);
-}
-
-// Enable all controls
-bool wxRadioBox::Enable(bool enable)
-{
- if ( !wxControl::Enable(enable) )
- return FALSE;
-
- for (int i = 0; i < m_noItems; i++)
- ::EnableWindow((HWND) m_radioButtons[i], enable);
-
- return TRUE;
-}
-
-// Show a specific button
-void wxRadioBox::Show(int item, bool show)
-{
- wxCHECK_RET( item >= 0 && item < m_noItems,
- wxT("invalid item in wxRadioBox::Show()") );
-
- ::ShowWindow((HWND)m_radioButtons[item], show ? SW_SHOW : SW_HIDE);
-}
-
-bool wxRadioBox::ContainsHWND(WXHWND hWnd) const
-{
- size_t count = GetCount();
- for ( size_t i = 0; i < count; i++ )
- {
- if ( GetRadioButtons()[i] == hWnd )
- return TRUE;
- }
-
- return FALSE;
-}
-
-void wxRadioBox::Command(wxCommandEvent & event)
-{
- SetSelection (event.m_commandInt);
- SetFocus();
- ProcessCommand (event);