-// panel->SetBackgroundColour("cadet blue");
-// panel->SetForegroundColour("blue");
- wxTextCtrl *tc = new wxTextCtrl( panel, ID_TEXT, "Write text here.", wxPoint(10,10), wxSize(320,28));
- (*tc) << " More text.";
-// tc->SetBackgroundColour("wheat");
- m_multitext = new wxTextCtrl( panel, ID_TEXT, "And here.", wxPoint(10,50), wxSize(320,160), wxTE_MULTILINE );
- (*m_multitext) << " More text.";
-// m_multitext->SetBackgroundColour("wheat");
- (void)new wxStaticBox( panel, -1, "wxClipboard", wxPoint(345,50), wxSize(160,145) );
- (void)new wxButton( panel, ID_COPY_TEXT, "Copy line 1", wxPoint(370,80), wxSize(110,30) );
- (void)new wxButton( panel, ID_PASTE_TEXT, "Paste text", wxPoint(370,140), wxSize(110,30) );
+ m_textentry = new MyTextCtrl( panel, -1, "Write text here.", wxPoint(10,10), wxSize(320,28),
+ wxTE_PROCESS_ENTER);
+ (*m_textentry) << " More text."; // this text is appended
+ m_textentry->SetInsertionPoint(0);
+ m_textentry->WriteText("Less text."); // this text is prepended
+
+ m_multitext = new MyTextCtrl( panel, ID_TEXT, "And here.", wxPoint(10,50), wxSize(320,70),
+ wxTE_MULTILINE );
+ (*m_multitext) << " More text.\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 wxStaticBox( panel, -1, "&Move cursor to the end of:",
+ wxPoint(345, 0), wxSize(160, 100) );
+ (void)new wxButton(panel, ID_MOVE_END_ENTRY, "Text &entry",
+ wxPoint(370, 20), wxSize(110, 30));
+ (void)new wxButton(panel, ID_MOVE_END_ZONE, "Text &zone",
+ wxPoint(370, 60), wxSize(110, 30));
+ (void)new wxStaticBox( panel, -1, "wx&Clipboard", wxPoint(338,120), wxSize(160,100) );
+ (void)new wxButton( panel, ID_COPY_TEXT, "C&opy line 1", wxPoint(362,140), wxSize(110,30) );
+ (void)new wxButton( panel, ID_PASTE_TEXT, "&Paste text", wxPoint(362,180), wxSize(110,30) );