-=======
- m_enter = new MyTextCtrl( this, -1, "Multiline, allow <ENTER> processing.",
- wxPoint(180,170), wxSize(240,70), wxTE_MULTILINE | wxTE_PROCESS_ENTER );
-
- wxButton *button;
-
- (void)new wxStaticBox( this, -1, "&Move cursor to the end of:", wxPoint(445, 10), wxSize(160, 100) );
- button = new wxButton( this, ID_MOVE_END_ENTRY, "&Single-line", wxPoint(470, 30), wxSize(110, 30) );
-#if wxUSE_TOOLTIPS
- button->SetToolTip("Move cursor in single-line text control to end of line.");
-#endif
- button = new wxButton( this, ID_MOVE_END_ZONE, "&Multi-line", wxPoint(470, 70), wxSize(110, 30) );
-#if wxUSE_TOOLTIPS
- button->SetToolTip("Move cursor in multi-line text control to end of first line.");
+ m_enter->SetClientData((void *)_T("enter"));
+
+ m_textrich = new MyTextCtrl(this, -1, "Allows more than 30Kb of text\n"
+ "(even under broken Win9x)\n"
+ "and a very very very very very "
+ "very very very long line to test "
+ "wxHSCROLL style",
+ wxPoint(450, 10), wxSize(230, 230),
+ wxTE_RICH |
+ wxTE_MULTILINE |
+ wxTE_AUTO_URL |
+ wxHSCROLL);
+
+#if 0
+ m_textrich->SetFont(wxFont(12, wxFONTFAMILY_TELETYPE,
+ wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
+ m_textrich->SetStyle(0, 10, *wxRED);
+ m_textrich->SetStyle(10, 20, *wxBLUE);
+ m_textrich->SetStyle(30, 40,
+ wxTextAttr(*wxGREEN, wxNullColour, *wxITALIC_FONT));
+ m_textrich->SetDefaultStyle(wxTextAttr());
+ m_textrich->AppendText(_T("\n\nFirst 10 characters should be in red\n"));
+ m_textrich->AppendText(_T("Next 10 characters should be in blue\n"));
+ m_textrich->AppendText(_T("Next 10 characters should be normal\n"));
+ m_textrich->AppendText(_T("And the next 10 characters should be green and italic\n"));
+ m_textrich->SetDefaultStyle(wxTextAttr(*wxCYAN, *wxBLUE));
+ m_textrich->AppendText(_T("This text should be cyan on blue\n"));
+ m_textrich->SetDefaultStyle(*wxBLUE);
+ m_textrich->AppendText(_T("And this should be in blue and the text you ")
+ _T("type should be in blue as well"));
+#else
+ m_textrich->SetDefaultStyle(wxTextAttr(*wxRED));
+ m_textrich->AppendText(_T("Red text\n"));
+ m_textrich->SetDefaultStyle(wxTextAttr(wxNullColour, *wxLIGHT_GREY));
+ m_textrich->AppendText(_T("Red on grey text\n"));
+ m_textrich->SetDefaultStyle(wxTextAttr(*wxBLUE));
+ m_textrich->AppendText(_T("Blue on grey text\n"));