It seems like it would be a fairly simple task, yet I have been unable to complete this task.
what language are you using?
I'm using VB.
try with Str(List1.List(x))
where x = the item # you want. Remember it starts from 0
That didn't work either. The error was that 'List is not a member of the 'Systems.Windows.Forms.ListBox'.
I try this with no error but it's not converting the items to a single string:
Dim OrigString As String = Me.lstLegend.Items.ToString()
Essentially I need to convert all of the items in a list box to a single string which can then be processed through a function.
Thanks, in advance.
Private Sub Command1_Click()
For x = 0 To 2
Label1.Caption = Label1.Caption & CStr(List1.List(x))
That worked perfectly for me, try it. I had 3 items in my List.
Separate names with a comma.