#pragma hdrstop
#endif
+#if wxUSE_RADIOBOX
+
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/sizer.h"
#include "widgets.h"
-#if 1
+
#include "icons/radiobox.xpm"
// ----------------------------------------------------------------------------
RadioPage_Selection,
RadioPage_Label,
RadioPage_LabelBtn,
+ RadioPage_Enable2nd,
+ RadioPage_Show2nd,
RadioPage_Radio
};
class RadioWidgetsPage : public WidgetsPage
{
public:
- RadioWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ RadioWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual ~RadioWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_radio; }
// the check/radio boxes for styles
wxCheckBox *m_chkVert;
+ wxCheckBox *m_2ndEnabled;
+ wxCheckBox *m_2ndShown;
wxRadioBox *m_radioDir;
// the gauge itself and the sizer it is in
IMPLEMENT_WIDGETS_PAGE(RadioWidgetsPage, _T("Radio"));
-RadioWidgetsPage::RadioWidgetsPage(wxNotebook *notebook,
- wxImageList *imaglist)
- : WidgetsPage(notebook)
+RadioWidgetsPage::RadioWidgetsPage(wxBookCtrl *book,
+ wxImageList *imaglist)
+ : WidgetsPage(book)
{
imaglist->Add(wxBitmap(radio_xpm));
// init everything
m_chkVert = (wxCheckBox *)NULL;
+ m_2ndEnabled = (wxCheckBox *)NULL;
+ m_2ndShown = (wxCheckBox *)NULL;
m_textNumBtns =
m_textLabelBtns =
&m_textLabelBtns);
sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
+ m_2ndEnabled = CreateCheckBoxAndAddToSizer(sizerMiddle, _T("2nd item enabled"));
+ m_2ndShown = CreateCheckBoxAndAddToSizer(sizerMiddle, _T("2nd item shown"));
+
// right pane
wxSizer *sizerRight = new wxBoxSizer(wxHORIZONTAL);
sizerRight->SetMinSize(150, 0);
m_textLabelBtns->SetValue(_T("item"));
m_chkVert->SetValue(false);
+ m_2ndEnabled->SetValue(true);
+ m_2ndShown->SetValue(true);
m_radioDir->SetSelection(RadioDir_Default);
}
m_sizerRadio->Add(m_radio, 1, wxGROW);
m_sizerRadio->Layout();
+
+ m_radio->Enable( 1 , m_2ndEnabled->GetValue() );
+ m_radio->Show( 1 , m_2ndShown->GetValue() );
}
// ----------------------------------------------------------------------------
event.Enable(enable);
}
-#endif
+#endif // wxUSE_RADIOBOX