]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/grid/test.cpp
made controls sample compile in unicode mode
[wxWidgets.git] / samples / grid / test.cpp
index 874ebeeb356997c61e079904af314eca713336e0..7662b5b09c2993c7d8c897804afc875f408ea50b 100644 (file)
@@ -40,8 +40,6 @@ class MyFrame: public wxFrame
     wxGrid *grid;
     MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size);
 
-    bool OnClose(void) { return TRUE; }
-
     void ToggleEditable(wxCommandEvent& event);
     void ToggleRowLabel(wxCommandEvent& event);
     void ToggleColLabel(wxCommandEvent& event);
@@ -137,7 +135,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->SetCellTextFont(wxTheFontList->FindOrCreateFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
+  frame->grid->SetCellTextFont(wxTheFontList->FindOrCreateFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0);
   frame->grid->SetCellTextColour(*wxRED, 1, 1);
   frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2);
   if (cellBitmap1 && cellBitmap2)
@@ -207,10 +205,10 @@ void MyFrame::ToggleColLabel(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event))
 {
-      if (!grid->GetDividerPen())
-        grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID));
+      if (!grid->GetDividerPen().Ok())
+        grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID));
       else
-        grid->SetDividerPen((wxPen *) NULL);
+        grid->SetDividerPen(wxNullPen);
       grid->Refresh();
 }