Text To Listbox

There are ocassions when a list box control needs to be populated with text for subsequent viewing.

The following code snippet will accomplish the desired task.

[codesyntax lang=”cpp”]

void psdUTilFrame::fileToLB(string inf, wxListBox * lb)
    wxTextFile flf;
    wxString infle = inf;
    for ( wxString str = flf.GetFirstLine(); !flf.Eof(); str = flf.GetNextLine() )



Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

Leave a Reply

Your email address will not be published. Required fields are marked *