X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa5f6926ecc17eebf4442611b066367eb17e11c4..3592c01e44f99408f6468cd18192a8a6a1c2c611:/samples/listctrl/listtest.cpp diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 3582c99cf4..8c4e700899 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -288,6 +288,24 @@ void MyFrame::OnReportView(wxCommandEvent& WXUNUSED(event)) tmp = m_listCtrl->SetItem(i, 2, buf); } + // we leave all mask fields to 0 and only change the colour + wxListItem item; + item.m_itemId = 0; + item.SetTextColour(*wxRED); + m_listCtrl->SetItem( item ); + + item.m_itemId = 2; + item.SetTextColour(*wxGREEN); + m_listCtrl->SetItem( item ); + item.m_itemId = 4; + item.SetTextColour(*wxLIGHT_GREY); + item.SetFont(*wxITALIC_FONT); + item.SetBackgroundColour(*wxRED); + m_listCtrl->SetItem( item ); + + m_listCtrl->SetTextColour(*wxBLUE); + m_listCtrl->SetBackgroundColour(*wxLIGHT_GREY); + m_listCtrl->SetColumnWidth( 0, wxLIST_AUTOSIZE ); m_listCtrl->SetColumnWidth( 1, wxLIST_AUTOSIZE ); m_listCtrl->SetColumnWidth( 2, wxLIST_AUTOSIZE );