Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding some text to a listbox

Status
Not open for further replies.

neillovell

Programmer
Aug 27, 2002
560
GB
Hi all,
I'm working with managed C++ and I want to add a simple text string to it in the form of

String* MyStr;
Str = "BlahBlah";

// Add to listbox here

I'm having all sorts of problems trying to add it to a listbox. I can create an event handler for add_Click() (so the text appears when the listbox is clicked) but the event is System::EventArgs and I think I need System::Windows::Forms::EventArgs which I cannot create an object of to pass to ListBoxDrawItem(Object* Sender, System::Windows::Forms::DrawItemEventArgs* Event) (the draw item handler I guess).


I'm in a mess, is there a simple way to just add a string to a listbox?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top