Inserting multiple space-characters into a ListBox

sameerpatra

New Member
I cant manage to insert a text with spaces into a ListBox control by using the ListBox.Items.Add() method.<BR><BR>If i insert a string with spaces like this:<BR><BR>myString = "A" & lots of spaces & "b"<BR>lstMyListBox.Items.Add(myString)<BR><BR>...then only one space is rendered.<BR><BR>If I insert a string with html-spaces (ampersand followed by nbsp;) then the ampersand-characters are converted to an html-ampersand before beeing delivered to the browser.<BR><BR>Would be very grateful for any help!<BR><BR>/Cheers<BR><BR>This worked for me. Did you hit enter on the keyboard or did you put the spaces in a string like this.<BR><BR> Dim myString as String<BR> myString = "A" & " " & "B"<BR> lstMyListBox.Items.Add(myString)<BR><BR>It works fine for me with ONE space, but if I try it with more than one space then only one is rendered by the browser. <BR><BR>
 
Back
Top