neillovell
Programmer
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:
rawItemEventArgs* 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?
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:
I'm in a mess, is there a simple way to just add a string to a listbox?