]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/listctrl/listtest.cpp
Fix code when making scrollwindow bigger so that
[wxWidgets.git] / samples / listctrl / listtest.cpp
index c472a5fb2cad99e30af28b246a3ecf068c75dea7..116212c3bf1b1355bfda8446a1f65915014fca8d 100644 (file)
@@ -164,13 +164,13 @@ bool MyApp::OnInit()
 MyFrame::MyFrame(const wxChar *title)
        : wxFrame(NULL, wxID_ANY, title)
 {
-    if (wxSystemSettings::GetScreenType() > wxSYS_SCREEN_SMALL)
-        SetSize(wxSize(450, 340));
-
     m_listCtrl = NULL;
     m_logWindow = NULL;
     m_smallVirtual = false;
 
+    if (wxSystemSettings::GetScreenType() > wxSYS_SCREEN_SMALL)
+        SetSize(wxSize(450, 340));
+
     // Give it an icon
     SetIcon( wxICON(mondrian) );
 
@@ -1052,10 +1052,10 @@ void MyListCtrl::InsertItemInReportView(int i)
     SetItemData(tmp, i);
 
     buf.Printf(_T("Col 1, item %d"), i);
-    SetItem(i, 1, buf);
+    SetItem(tmp, 1, buf);
 
     buf.Printf(_T("Item %d in column 2"), i);
-    SetItem(i, 2, buf);
+    SetItem(tmp, 2, buf);
 }
 
 #if USE_CONTEXT_MENU