Can I set the items column width for a listbox list
Can I set the items column width for a listbox list
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.
Re: Can I set the items column width for a listbox list
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)
VPN_Names.List = Split(File.Load(FileName1), "\\n")
to
VPN_Names.List = Split(File.Load(FileName1), gb.NewLine)
- cogier
- Site Admin
- Posts: 1126
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Can I set the items column width for a listbox list
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.