]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/text/text.cpp
ensure all topic overviews have an horizontal rule with the list of the sections...
[wxWidgets.git] / samples / text / text.cpp
index ce77e8de8c491442d5d9cfedd44184827850608d..bf9b9dc253e61d77ddd97de0fc5ace51af8c8fe5 100644 (file)
@@ -921,6 +921,10 @@ void MyTextCtrl::OnKeyDown(wxKeyEvent& event)
                 wxLogMessage(_T("Selection = '%s' (len = %u)"),
                              sel.c_str(),
                              (unsigned int) sel.length());
+
+                const wxString text = GetLineText(line);
+                wxLogMessage(_T("Current line: \"%s\"; length = %lu"),
+                             text.c_str(), text.length());
             }
             break;
 
@@ -1036,7 +1040,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
     // a little hack to use the command line argument for encoding testing
     if ( wxTheApp->argc == 2 )
     {
-        switch ( wxTheApp->argv[1][0] )
+        switch ( (wxChar)wxTheApp->argv[1][0] )
         {
             case '2':
                 m_horizontal->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxNORMAL,
@@ -1828,10 +1832,9 @@ void RichTextFrame::OnIdle(wxIdleEvent& WXUNUSED(event))
                 alignment = wxT("left-aligned");
             else if (attr.GetAlignment() == wxTEXT_ALIGNMENT_JUSTIFIED)
                 alignment = wxT("justified");
-            msg.Printf(wxT("Facename: %s, wxColour(%d, %d, %d), %s"),
-                (const wxChar*) facename,
+            msg.Printf( "Facename: %s, wxColour(%d, %d, %d), %s", facename,
                 attr.GetTextColour().Red(), attr.GetTextColour().Green(), attr.GetTextColour().Blue(),
-                (const wxChar*) alignment);
+                alignment );
 
             if (attr.HasFont())
             {