- m_notebook->AddPage(panel, "wxListBox", TRUE, Image_List);
-
- panel = new wxPanel(m_notebook);
- m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,-1), 5, choices );
- (void)new wxButton( panel, ID_CHOICE_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
- (void)new wxButton( panel, ID_CHOICE_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
- (void)new wxButton( panel, ID_CHOICE_CLEAR, "Clear", wxPoint(180,80), wxSize(140,30) );
- (void)new wxButton( panel, ID_CHOICE_APPEND, "Append 'Hi!'", wxPoint(340,80), wxSize(140,30) );
- (void)new wxButton( panel, ID_CHOICE_DELETE, "Delete selected item", wxPoint(180,130), wxSize(140,30) );
- (void)new wxButton( panel, ID_CHOICE_FONT, "Set Italic font", wxPoint(340,130), wxSize(140,30) );
- (void)new wxCheckBox( panel, ID_CHOICE_ENABLE, "Disable", wxPoint(20,130), wxSize(140,30) );
- m_notebook->AddPage(panel, "wxChoice", FALSE, Image_Choice);
-
- panel = new wxPanel(m_notebook);
- m_combo = new wxComboBox( panel, ID_COMBO, "This", wxPoint(10,10), wxSize(120,-1), 5, choices );
- (void)new wxButton( panel, ID_COMBO_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
- (void)new wxButton( panel, ID_COMBO_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
- (void)new wxButton( panel, ID_COMBO_CLEAR, "Clear", wxPoint(180,80), wxSize(140,30) );
- (void)new wxButton( panel, ID_COMBO_APPEND, "Append 'Hi!'", wxPoint(340,80), wxSize(140,30) );
- (void)new wxButton( panel, ID_COMBO_DELETE, "Delete selected item", wxPoint(180,130), wxSize(140,30) );
- (void)new wxButton( panel, ID_COMBO_FONT, "Set Italic font", wxPoint(340,130), wxSize(140,30) );
- (void)new wxCheckBox( panel, ID_COMBO_ENABLE, "Disable", wxPoint(20,130), wxSize(140,30) );
- m_notebook->AddPage(panel, "wxComboBox", FALSE, Image_Combo);
-
- panel = new wxPanel(m_notebook);
- m_textentry = new MyTextCtrl( panel, -1, "Some text.", wxPoint(10,10), wxSize(320,28),
- //0);
- wxTE_PROCESS_ENTER);
- (*m_textentry) << " Appended.";
- m_textentry->SetInsertionPoint(0);
- m_textentry->WriteText( "Prepended. " );
-
- m_multitext = new MyTextCtrl( panel, ID_TEXT, "Some text.", wxPoint(10,50), wxSize(320,70),
- wxTE_MULTILINE );
- (*m_multitext) << " Appended.";
- m_multitext->SetInsertionPoint(0);
- m_multitext->WriteText( "Prepended. " );
- m_multitext->AppendText( "\nPress function keys to test different \nwxTextCtrl functions." );
-
- new MyTextCtrl( panel, -1, "This one is with wxTE_PROCESS_TAB style.",
- wxPoint(10,120), wxSize(320,70), wxTE_MULTILINE | wxTE_PROCESS_TAB);
+ (void)new wxCheckBox( panel, ID_CHANGE_COLOUR, _T("&Toggle colour"),
+ wxPoint(110,170) );
+ panel->SetCursor(wxCursor(wxCURSOR_HAND));
+ m_book->AddPage(panel, _T("wxListBox"), true, Image_List);
+
+#if wxUSE_CHOICE
+ panel = new wxPanel(m_book);
+ m_choice = new MyChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,wxDefaultCoord), 5, choices );
+ m_choiceSorted = new MyChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,wxDefaultCoord),
+ 5, choices, wxCB_SORT );
+
+ SetChoiceClientData(wxT("choice"), m_choice);
+ SetChoiceClientData(wxT("choice"), m_choiceSorted);
+
+ m_choice->SetSelection(2);
+ m_choice->SetBackgroundColour( wxT("red") );
+ (void)new wxButton( panel, ID_CHOICE_SEL_NUM, _T("Select #&2"), wxPoint(180,30), wxSize(140,30) );
+ (void)new wxButton( panel, ID_CHOICE_SEL_STR, _T("&Select 'This'"), wxPoint(340,30), wxSize(140,30) );
+ (void)new wxButton( panel, ID_CHOICE_CLEAR, _T("&Clear"), wxPoint(180,80), wxSize(140,30) );
+ (void)new wxButton( panel, ID_CHOICE_APPEND, _T("&Append 'Hi!'"), wxPoint(340,80), wxSize(140,30) );
+ (void)new wxButton( panel, ID_CHOICE_DELETE, _T("D&elete selected item"), wxPoint(180,130), wxSize(140,30) );
+ (void)new wxButton( panel, ID_CHOICE_FONT, _T("Set &Italic font"), wxPoint(340,130), wxSize(140,30) );
+ (void)new wxCheckBox( panel, ID_CHOICE_ENABLE, _T("&Disable"), wxPoint(20,130), wxSize(140,30) );
+
+ m_book->AddPage(panel, _T("wxChoice"), false, Image_Choice);
+#endif // wxUSE_CHOICE
+
+ panel = new wxPanel(m_book);
+ (void)new wxStaticBox( panel, wxID_ANY, _T("&Box around combobox"),
+ wxPoint(5, 5), wxSize(150, 100));
+ m_combo = new MyComboBox( panel, ID_COMBO, _T("This"),
+ wxPoint(20,25), wxSize(120, wxDefaultCoord),
+ 5, choices,
+ wxCB_READONLY | wxPROCESS_ENTER);
+ m_combo->SetBackgroundColour(*wxBLUE);
+
+ (void)new wxButton( panel, ID_COMBO_SEL_NUM, _T("Select #&2"), wxPoint(180,30), wxSize(140,30) );
+ (void)new wxButton( panel, ID_COMBO_SEL_STR, _T("&Select 'This'"), wxPoint(340,30), wxSize(140,30) );
+ (void)new wxButton( panel, ID_COMBO_CLEAR, _T("&Clear"), wxPoint(180,80), wxSize(140,30) );
+ (void)new wxButton( panel, ID_COMBO_APPEND, _T("&Append 'Hi!'"), wxPoint(340,80), wxSize(140,30) );
+ (void)new wxButton( panel, ID_COMBO_DELETE, _T("D&elete selected item"), wxPoint(180,130), wxSize(140,30) );
+ (void)new wxButton( panel, ID_COMBO_FONT, _T("Set &Italic font"), wxPoint(340,130), wxSize(140,30) );
+ (void)new wxCheckBox( panel, ID_COMBO_ENABLE, _T("&Disable"), wxPoint(20,130), wxSize(140,30) );
+ m_book->AddPage(panel, _T("wxComboBox"), false, Image_Combo);
+
+ wxString choices2[] =
+ {
+ _T("First"), _T("Second"),
+ /* "Third",
+ "Fourth", "Fifth", "Sixth",
+ "Seventh", "Eighth", "Nineth", "Tenth" */
+ };
+
+ panel = new wxPanel(m_book);
+ (void)new MyRadioBox( panel, ID_RADIOBOX, _T("&That"), wxPoint(10,160), wxDefaultSize, WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS );
+ m_radio = new wxRadioBox( panel, ID_RADIOBOX, _T("T&his"), wxPoint(10,10), wxDefaultSize, WXSIZEOF(choices), choices, 1, wxRA_SPECIFY_COLS );
+ m_radio->SetForegroundColour(*wxRED);
+