]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/grid/grid.cpp
don't treat changing focus to popup's child as loosing it
[wxWidgets.git] / samples / grid / grid.cpp
index ed7ad8001abc1f37dbd46a1d93ba83fb9834c0b3..2e1d4544d23bab31a8df39d68fbf1d0a70cde7e3 100644 (file)
@@ -9,11 +9,6 @@
 
 static const char sccsid[] = "%W% %G%";
 
 
 static const char sccsid[] = "%W% %G%";
 
-#ifdef __GNUG__
-#pragma implementation
-#pragma interface
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -139,7 +134,7 @@ bool MyApp::OnInit(void)
   frame->grid->SetCellValue("First cell", 0, 0);
   frame->grid->SetCellValue("Another cell", 1, 1);
   frame->grid->SetCellValue("Yet another cell", 2, 2);
   frame->grid->SetCellValue("First cell", 0, 0);
   frame->grid->SetCellValue("Another cell", 1, 1);
   frame->grid->SetCellValue("Yet another cell", 2, 2);
-  frame->grid->SetCellTextFont(* wxTheFontList->FindOrCreateFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
+  frame->grid->SetCellTextFont(wxFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
   frame->grid->SetCellTextColour(*wxRED, 1, 1);
   frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2);
   if (cellBitmap1 && cellBitmap2)
   frame->grid->SetCellTextColour(*wxRED, 1, 1);
   frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2);
   if (cellBitmap1 && cellBitmap2)
@@ -217,7 +212,7 @@ void MyFrame::ToggleColLabel(wxCommandEvent& WXUNUSED(event))
 void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event))
 {
       if (!grid->GetDividerPen().Ok())
 void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event))
 {
       if (!grid->GetDividerPen().Ok())
-        grid->SetDividerPen(* wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID));
+        grid->SetDividerPen(wxPen(wxT("LIGHT GREY"), 1, wxSOLID));
       else
         grid->SetDividerPen(wxNullPen);
       grid->Refresh();
       else
         grid->SetDividerPen(wxNullPen);
       grid->Refresh();