Set the font of the memo to a monospaced font like Courier New
. That way, every character will be the same width, and you can use that to align the texts or show ASCII arts in the memo.
Alternatively you can use a listview or a stringgrid, which support displaying text in columns. For your purpose, this is probably the better option.
If you decide to stick with the memo, then apart from setting the font, you will have to make all the strings before the colons the same width. You can use a simple padding function for that. A nice example is given on SwissDelphiPages:
function RightPad(S: string; Ch: Char; Len: Integer): string;
var
RestLen: Integer;
begin
Result := S;
RestLen := Len - Length(s);
if RestLen < 1 then Exit;
Result := StringOfChar(Ch, RestLen) + S;
end;
So you can use it like this:
Memo.Lines.Add(RightPad('some_string', ' ', 20) + ':' + some_string);