#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/setup.h"
+ #include "wx/wxchar.h"
+ #include "wx/string.h"
#include "wx/bitmap.h"
#include "wx/brush.h"
#include "wx/radiobox.h"
#include "wx/os2/private.h"
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
-#endif
// ---------------------------------------------------------------------------
// private functions
// wxRadioBox
// ---------------------------------------------------------------------------
+int wxRadioBox::GetCount() const
+{
+ return m_noItems;
+}
+
+int wxRadioBox::GetColumnCount() const
+{
+ return GetNumHor();
+}
+
+int wxRadioBox::GetRowCount() const
+{
+ return GetNumVer();
+}
+
int wxRadioBox::GetNumVer() const
{
if ( m_windowStyle & wxRA_SPECIFY_ROWS )
const wxPoint& pos, const wxSize& size,
int n, const wxString choices[],
int majorDim, long style,
+#if wxUSE_VALIDATORS
const wxValidator& val, const wxString& name)
+#endif
{
m_selectedButton = -1;
m_noItems = n;
SetName(name);
+#if wxUSE_VALIDATORS
SetValidator(val);
-
+#endif
parent->AddChild(this);
m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();
}
+void wxRadioBox::SetString(int item, const wxString& label)
+{
+ wxCHECK_RET( item >= 0 && item < m_noItems, wxT("invalid radiobox index") );
+
+ m_radioWidth[item] = m_radioHeight[item] = -1;
+ ::WinSetWindowText((HWND)m_radioButtons[item], label.c_str());
+}
+
wxString wxRadioBox::GetLabel(int item) const
{
wxCHECK_MSG( item >= 0 && item < m_noItems, wxT(""), wxT("invalid radiobox index") );