]> git.saurik.com Git - wxWidgets.git/commitdiff
use more clear messaage about the custom labels in message box test
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 5 Sep 2008 16:56:45 +0000 (16:56 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 5 Sep 2008 16:56:45 +0000 (16:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/dialogs/dialogs.cpp

index 568ae5e2920b3921dbd87d6e48e96151be12960d..c6eb85470fbbac5efc31723cae054ef572c221de 100644 (file)
@@ -653,18 +653,29 @@ void MyFrame::LogDialog(wxCommandEvent& WXUNUSED(event))
 void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event) )
 {
     wxMessageDialog dialog(this,
-                           _T("This is a message box\nA long, long string to test out the message box properly"),
-                           _T("Message box text"),
+                           "This is a message box\n"
+                           "A long, long string to test out the message box "
+                           "layout properly.",
+                           "Message box text",
                            wxCENTER | wxNO_DEFAULT | wxYES_NO | wxCANCEL | wxICON_INFORMATION);
 
-    if ( dialog.SetYesNoLabels(_T("Answer &Yes"),_T("Answer &No")) )
+    wxString extmsg;
+    if ( dialog.SetYesNoCancelLabels
+                (
+                    "Answer &Yes",
+                    "Answer &No",
+                    "Refuse to answer"
+                ) )
     {
-        dialog.SetExtendedMessage(_T("This platform supports custom button labels"));
+        extmsg = "This platform supports custom button labels,\n"
+                 "so you should see the descriptiva text below.";
     }
     else
     {
-        dialog.SetExtendedMessage(_T("Custom button labels are not supported."));
+        extmsg = "Custom button labels are not supported on this platform,\n"
+                 "so the default \"Yes\"/\"No\"/\"Cancel\" buttons are used.";
     }
+    dialog.SetExtendedMessage(extmsg);
 
     switch ( dialog.ShowModal() )
     {