]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/forty/scoredg.cpp
Fix wrong in wxListCtrl::SetItemColumnImage() in r74716.
[wxWidgets.git] / demos / forty / scoredg.cpp
index 79fc942fa84347230364f2ecc25a0133e31ea2f0..4653343b2570f0e36affeb210339715304415320 100644 (file)
@@ -4,16 +4,10 @@
 // Author:      Chris Breeze
 // Modified by:
 // Created:     21/07/97
-// RCS-ID:      $Id$
 // Copyright:   (c) 1993-1998 Chris Breeze
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(__APPLE__)
-#pragma implementation
-#pragma interface
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -161,18 +155,18 @@ ScoreDialog::ScoreDialog(wxWindow* parent, ScoreFile* file) :
             average = (2 * score + games) / (2 * games);
         }
         list->SetCellValue(i,0,players[i]);
-        string_value.Printf( _T("%u"), wins );
+        string_value.Printf( wxT("%u"), wins );
         list->SetCellValue(i,1,string_value);
-        string_value.Printf( _T("%u"), games );
+        string_value.Printf( wxT("%u"), games );
         list->SetCellValue(i,2,string_value);
-        string_value.Printf( _T("%u"), average );
+        string_value.Printf( wxT("%u"), average );
         list->SetCellValue(i,3,string_value);
     }
-    list->SetColLabelValue(0, _T("Players"));
-    list->SetColLabelValue(1, _T("Wins"));
-    list->SetColLabelValue(2, _T("Games"));
-    list->SetColLabelValue(3, _T("Score"));
-    list->SetEditable(false);
+    list->SetColLabelValue(0, wxT("Players"));
+    list->SetColLabelValue(1, wxT("Wins"));
+    list->SetColLabelValue(2, wxT("Games"));
+    list->SetColLabelValue(3, wxT("Score"));
+    list->EnableEditing(false);
     list->AutoSizeColumns();
     list->AutoSizeRows();
     list->SetRowLabelSize(0);
@@ -186,12 +180,12 @@ ScoreDialog::ScoreDialog(wxWindow* parent, ScoreFile* file) :
     ScoreCanvas* list = new ScoreCanvas(this, m_scoreFile, wxDefaultPosition, sz);
 #endif
 
-    list->SetBestFittingSize(sz);
+    list->SetInitialSize(sz);
 
     // locate and resize with sizers
     wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
     topsizer->Add( list, 1, wxALL|wxGROW, 10 );
-    wxButton *button = new wxButton(this, wxID_OK, _("OK"));
+    wxButton *button = new wxButton(this, wxID_OK);
     topsizer->Add( button, 0, wxALIGN_CENTER_HORIZONTAL|wxALL , 10 );
     button->SetFocus();
 
@@ -203,10 +197,6 @@ ScoreDialog::ScoreDialog(wxWindow* parent, ScoreFile* file) :
     CentreOnParent();
 }
 
-ScoreDialog::~ScoreDialog()
-{
-}
-
 void ScoreDialog::Display()
 {
     ShowModal();