Frage

How can I retrieve label information for a wxlistctrl ? I've tried something like :

wxListItem  itemCol;

m_listCtrl->GetColumn(0, itemCol);
printf("%s\n", itemCol.GetText().c_str());

but it doesn't work, I get an empty string !

Can someone help me ?

War es hilfreich?

Lösung

wxListItem column;
column.SetText(_("Column 1"));
m_List->InsertColumn(0, column);

wxListItem result;
result.SetMask(wxLIST_MASK_TEXT);
m_List->GetColumn(0, result);
wxMessageBox(result.GetText());
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top