From 95bf655c502b2d577df2da470f532ab1b001db91 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 6 Feb 2000 20:36:00 +0000 Subject: [PATCH] Small modifications to listtest. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/listctrl/listtest.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 8d2bc895e7..269ed56168 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -248,8 +248,9 @@ void MyFrame::OnSelectAll(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnListView(wxCommandEvent& WXUNUSED(event)) { - m_listCtrl->DeleteAllItems(); + m_listCtrl->ClearAll(); m_logWindow->Clear(); + m_listCtrl->SetSingleStyle(wxLC_LIST); m_listCtrl->SetImageList((wxImageList *) NULL, wxIMAGE_LIST_NORMAL); m_listCtrl->SetImageList((wxImageList *) NULL, wxIMAGE_LIST_SMALL); @@ -264,9 +265,8 @@ void MyFrame::OnListView(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnReportView(wxCommandEvent& WXUNUSED(event)) { - m_listCtrl->DeleteAllItems(); - m_listCtrl->DeleteAllColumns(); m_logWindow->Clear(); + m_listCtrl->ClearAll(); m_listCtrl->SetSingleStyle(wxLC_REPORT); m_listCtrl->SetImageList((wxImageList *) NULL, wxIMAGE_LIST_NORMAL); @@ -325,8 +325,9 @@ void MyFrame::OnReportView(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnIconView(wxCommandEvent& WXUNUSED(event)) { - m_listCtrl->DeleteAllItems(); m_logWindow->Clear(); + m_listCtrl->ClearAll(); + m_listCtrl->SetSingleStyle(wxLC_ICON); m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL); m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL); @@ -339,8 +340,9 @@ void MyFrame::OnIconView(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnIconTextView(wxCommandEvent& WXUNUSED(event)) { - m_listCtrl->DeleteAllItems(); m_logWindow->Clear(); + m_listCtrl->ClearAll(); + m_listCtrl->SetSingleStyle(wxLC_ICON); m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL); m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL); @@ -355,8 +357,9 @@ void MyFrame::OnIconTextView(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnSmallIconView(wxCommandEvent& WXUNUSED(event)) { - m_listCtrl->DeleteAllItems(); m_logWindow->Clear(); + m_listCtrl->ClearAll(); + m_listCtrl->SetSingleStyle(wxLC_SMALL_ICON); m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL); m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL); @@ -369,8 +372,9 @@ void MyFrame::OnSmallIconView(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnSmallIconTextView(wxCommandEvent& WXUNUSED(event)) { - m_listCtrl->DeleteAllItems(); m_logWindow->Clear(); + m_listCtrl->ClearAll(); + m_listCtrl->SetSingleStyle(wxLC_SMALL_ICON); m_listCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL); m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL);