I'm trying to insert some stuff into a ListCtrl but I'm having no luck whatsoever.
Could someone please point out what errors I have in the following code.
Thanks.
Code:
void MainWindow::OnFileOpen (wxCommandEvent &event)
{
DisplayCode dialog (this, -1, "Code Listing");
wxListCtrl *codeListing = (wxListCtrl*)FindWindow (ID_LISTCTRL);
codeListing->InsertColumn (0, "Line", wxLIST_FORMAT_LEFT, 100);
codeListing->InsertColumn (1, "Executed", wxLIST_FORMAT_LEFT, 100);
codeListing->InsertColumn (2, "Code", wxLIST_FORMAT_LEFT, 375);
codeListing->SetTextColour (*wxRED);
int result = codeListing->InsertItem (5, "TEeeeeeee"); // DOESN'T SEEM TO WORK
codeListing->SetItem (0, 0, "Test", -1);
dialog.ShowModal ();
wxString temp;
//temp += wxString::Format("%d", codeListing->GetItemCount ());
temp += wxString::Format("%d", result);
wxMessageBox(temp, "Heading", wxOK | wxICON_INFORMATION, this);
// I am getting an output of 5 being displayed in the message box above....this seems correct
// .... see the codeListing-InsertItem (5......) line......but nothing is being displayed in the ListCtrl
}