]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/text/text.cpp
Changed licence references to "wxWindows licence".
[wxWidgets.git] / samples / text / text.cpp
index 8880c7880827b6161fba6c7d705307ed978a0368..6de65763706c7ed9f5080c3d3dc705a14429e774 100644 (file)
@@ -545,8 +545,6 @@ bool MyApp::OnInit()
 
     frame->Show(true);
 
-    SetTopWindow(frame);
-
     // report success
     return true;
 }
@@ -1863,9 +1861,20 @@ void RichTextFrame::OnIdle(wxIdleEvent& WXUNUSED(event))
                 alignment = wxT("left-aligned");
             else if (attr.GetAlignment() == wxTEXT_ALIGNMENT_JUSTIFIED)
                 alignment = wxT("justified");
-            msg.Printf( "Facename: %s, wxColour(%d, %d, %d), %s", facename,
-                attr.GetTextColour().Red(), attr.GetTextColour().Green(), attr.GetTextColour().Blue(),
-                alignment );
+
+            msg.Printf("Facename: %s", facename);
+
+            if (attr.HasTextColour())
+            {
+                msg += wxString::Format(", colour: %s",
+                                        attr.GetTextColour().GetAsString());
+            }
+            else
+            {
+                msg += ", no colour";
+            }
+
+            msg << ", " << alignment;
 
             if (attr.HasFont())
             {