+ bottomsizer->Add( button1, 0, wxALL, 10 );
+ bottomsizer->Add( button2, 0, wxALL, 10 );
+
+ mainsizer->Add( bottomsizer, 0, wxCENTER );
+
+ // tell frame to make use of sizer (or constraints, if any)
+ m_panel->SetAutoLayout( TRUE );
+ m_panel->SetSizer( mainsizer );
+
+ // don't allow frame to get smaller than what the sizers tell ye
+ mainsizer->SetSizeHints( this );
+
+ Show(TRUE);
+}
+
+void CheckListBoxFrame::CreateCheckListbox(long flags)
+{
+ // check list box
+ static const wxChar *aszChoices[] =
+ {
+ _T("Zeroth"),
+ _T("First"), _T("Second"), _T("Third"),
+ _T("Fourth"), _T("Fifth"), _T("Sixth"),
+ _T("Seventh"), _T("Eighth"), _T("Nineth")
+ };
+
+ wxString *astrChoices = new wxString[WXSIZEOF(aszChoices)];
+ unsigned int ui;
+ for ( ui = 0; ui < WXSIZEOF(aszChoices); ui++ )
+ astrChoices[ui] = aszChoices[ui];
+
+ m_pListBox = new wxCheckListBox
+ (
+ m_panel, // parent
+ Control_Listbox, // control id
+ wxPoint(10, 10), // listbox poistion
+ wxSize(400, 100), // listbox size
+ WXSIZEOF(aszChoices), // number of strings
+ astrChoices, // array of strings
+ flags
+ );
+
+ //m_pListBox->SetBackgroundColour(*wxGREEN);
+
+ delete [] astrChoices;
+
+ // set grey background for every second entry
+ for ( ui = 0; ui < WXSIZEOF(aszChoices); ui += 2 ) {
+ AdjustColour(ui);
+ }
+
+ m_pListBox->Check(2);
+ m_pListBox->Select(3);