// Test accessing items text. void TreeListCtrlTestCase::ItemText() { CPPUNIT_ASSERT_EQUAL( "Cocoa", m_treelist->GetItemText(m_code_osx_cocoa) ); CPPUNIT_ASSERT_EQUAL( "46", m_treelist->GetItemText(m_code_osx_cocoa, 1) ); m_treelist->SetItemText(m_code_osx_cocoa, "wxCocoa"); CPPUNIT_ASSERT_EQUAL( "wxCocoa", m_treelist->GetItemText(m_code_osx_cocoa) ); m_treelist->SetItemText(m_code_osx_cocoa, 1, "47"); CPPUNIT_ASSERT_EQUAL( "47", m_treelist->GetItemText(m_code_osx_cocoa, 1) ); }
wxTreeListItem TreeListCtrlTestCase::AddItem(const char *label, wxTreeListItem parent, const char *numFiles, const char *size) { if ( !parent.IsOk() ) parent = m_treelist->GetRootItem(); wxTreeListItem item = m_treelist->AppendItem(parent, label); m_treelist->SetItemText(item, 1, numFiles); m_treelist->SetItemText(item, 2, size); m_numItems++; return item; }