Screen Shot:
Example Code:
Code: Select all
#include <wx/wx.h>
class Test : public wxApp
{
public:
virtual bool OnInit() {
wxFrame* fr = new wxFrame(NULL, -1, "Scrolwin Test");
//sizer to encompass the scrolled window
wxBoxSizer* pnlsz = new wxBoxSizer(wxVERTICAL);
//sizer for the inside of the scrolled window
wxScrolledWindow* inner = new wxScrolledWindow(fr, -1, wxDefaultPosition,
wxDefaultSize, wxVSCROLL | wxTAB_TRAVERSAL);
inner->SetScrollRate(10, 10);
wxBoxSizer* scrollsz = new wxBoxSizer(wxVERTICAL);
wxBoxSizer* gndrsz = new wxBoxSizer(wxHORIZONTAL);
wxStaticText* lblgndr = new wxStaticText(inner, -1, "Gender",
wxDefaultPosition, wxSize(100, -1));
wxString ch[2] = {"Male", "Female"};
wxRadioBox* _rbGndr = new wxRadioBox(inner, 40000, ".", wxDefaultPosition,
wxSize(250, 100), 2, ch, 2, wxRA_SPECIFY_COLS);
gndrsz->Add(lblgndr, 0, wxALL, 2);
gndrsz->Add(_rbGndr, 0, wxALL, 2);
scrollsz->Add(gndrsz, 0, wxALL | wxEXPAND, 2);
//add more to make scroll bar appear
scrollsz->Add(10, 100);
scrollsz->Add(10, 100);
inner->SetSizer(scrollsz);
pnlsz->Add(inner, 1, wxALL | wxEXPAND, 2);
fr->SetSizer(pnlsz);
fr->Show();
return true;
}
virtual int OnExit() {
return 0;
}
};
IMPLEMENT_APP(Test)
Any workaround, patch, or information on the problem so I can create my own patch would be extremely helpful.
Info:
wxWidgets 2.6.2 (wxmsw)
Windows XP SP2