Can I set the items column width for a listbox list

Post

Posted
Rating:
#1 (In Topic #222)
Trainee
I have a listbox on my main form that I populate from a text file. No problem there. And I set the listbox width to accommodate the the maximum width of a list item. But when I run in debug the items column width is truncated to 15 characters and the remaining characters for that item is listed on next line of the list. Is there a way to set the list width so that each item in the list is not truncated in this way? Thanks in advance for any replies. The listbox is set to vertical scrollbar with single mode.
Online now: No Back to the top

Post

Posted
Rating:
#2
Trainee
 I fixed it. I changed the following line:

 VPN_Names.List = Split(File.Load(FileName1), "\n")

 to

 VPN_Names.List = Split(File.Load(FileName1), gb.NewLine)
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Guru
cogier is in the usergroup ‘Guru’
 The problem with your first code was the '\n', which causes all sorts of interesting issues. If you had used '\n' it would have worked OK.
Online now: No Back to the top
1 guest and 0 members have just viewed this.