# how to align text in a memo component from a file

I am using Delphi5

I write to a text file as below

AssignFile(outfile, 'c:\music selection\dispsongs.txt');
Rewrite(outfile);

the text is not aligned in columns.

I have when writing to the file used field width numbers eg.
writeln(outfile, datamodule1.tblMuicSelSong['CdName']:30

If I open this file using windows notepad the columns align correctly

How do I fix this problem?

Ivan
LVL 3
###### Who is Participating?

Commented:
Notepad is set up (usually) to use a fixed width font.  Are you using a fixed width font like courier new in your memo?  This should fix the probem, but if you want to use a variable sized width font like ms-san seriff or Times New Roman, maybe someone else can help you with that.
0

Commented:
That is exactly the solution toesable.

Motaz
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.