K Feening
asked on
VB Listbox/ListView
Hi
For reasons to long to explain I have a listView that only allows 2 Columns 1 is hidden so it displays 1
I need to display 3
I am using
s = 'Testing 1'
s = string.format("{0,-50}", s)
k = s
s = '23/10/2014'
s = string.format("{0,-22}", s)
k = k + s
s = '01/04/2015'
s = string.format("{0,-12}", s)
k = k + s
Categorieslist.add(1,k)
do the same for next record but depending on the lettering Capitals etc the two records are out of align is there a way to get them to line up
e.g
AAAAA 12/10/2014
WWWW 12/10/2014
Even though there are 4 characters they don't align
For reasons to long to explain I have a listView that only allows 2 Columns 1 is hidden so it displays 1
I need to display 3
I am using
s = 'Testing 1'
s = string.format("{0,-50}", s)
k = s
s = '23/10/2014'
s = string.format("{0,-22}", s)
k = k + s
s = '01/04/2015'
s = string.format("{0,-12}", s)
k = k + s
Categorieslist.add(1,k)
do the same for next record but depending on the lettering Capitals etc the two records are out of align is there a way to get them to line up
e.g
AAAAA 12/10/2014
WWWW 12/10/2014
Even though there are 4 characters they don't align
ASKER
yes I would like the fields to line up
WWWW 12/10/2014
aaaa 12/10/2014
This listview is custom control with no option to change font and using the Tab character chr(9) show error not defined
WWWW 12/10/2014
aaaa 12/10/2014
This listview is custom control with no option to change font and using the Tab character chr(9) show error not defined
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This will depend on the display context and the font used. Most will respect the relative widths of characters, giving more space to a 'w' or an 'm' than to an 'i' (lower case 'L'), for example.
In general, you need to choose a fixed-width font, such as 'New Courier' or to separate your fields with a 'tab' character.