Listbox Alignment Problems

dilbert0610

Member
Joined
Aug 3, 2006
Messages
22
Programming Experience
Beginner
I have an application that searches for something in a line of text from a text file. If the search finds a match it will place the whole line into the listbox. The line contains a part number, PO number, quantities and dates. The text file has all the rows lined up properly (like the dates and part numbers) using spaces. Some orders do not contain a part number so in those are just spaces to take the place of the missing part number. When I place these lines into the listbox they do not account for all the spaces for some reason. It either skips over some spacers or its not using a proportional font.

My boss who programs in DBase said i need to grab a proportional font. I searched all over and cant find anything about it. Was hoping someone can help me out.

** in addition its not only the ones missing part numbers.. if u look at the text file all of the items line up properly. But when placed into the listbox even one with part numbers do not line up properly.

Sorry this might sound confusing if you need anymore info just ask. Thanks in advance for the help
 
"Lucida Console" (which is the default font in Notepad) and "Courier New" (which is default font in Visual Studio code editor) are two examples of what you ask "proportional fonts", or fonts where each character takes equal amount of space.
Here are some font samples that displays this phenomenon:
abc defghijklmnopqrstuvwxyz Verdana
zyx wvutsrqponmlkjihgfedcba

abc defghijklmnopqrstuvwxyz Courier New
zyx wvutsrqponmlkjihgfedcba

abc defghijklmnopqrstuvwxyz Lucida Console
zyx wvutsrqponmlkjihgfedcba

abc defghijklmnopqrstuvwxyz Times New Roman
zyx wvutsrqponmlkjihgfedcba
 
Back
Top