Writing TXT formatted through VB6

0

I'm trying to copy the structure of a GRID / Table inside a text file, including copying the structure of the cells (Table).

However, I can not align the columns in the text file, although it has a default size for each column.

The process works as follows, I measure the largest item contained in each row of each column and then use its size to define the total space of the column in question. When the text is smaller than the total size of the column, I fill in the remaining characters with whitespace.

What I noticed, that is the letters come out of varying sizes and my measure is given by the number of characters. However, the space that the letter "A" occupies, is different from the space occupied by the letter "T" for example.

I tried to choose some true-tipe fonts in notepad (Tahoma, Arial, Impact) but even so the letters seem to have different size in notepad.

Can you tell me how I could build a standard-sized table in notepad !? Considering for example that the unit of measure is the size of the character.

    
asked by anonymous 04.08.2014 / 18:54

1 answer

2

The problem is not in your program that generates the text file (VB6) but in the file view, because if the program used (eg notepad) is using a variable spacing font (eg arial) the content will be scrambled.

You do not have to use true-type fonts but rather fixed-spacing fonts, such as: courier new.

    
04.08.2014 / 19:08