Tab #9 in messagedlg not working in Vista

The code

messagedlg('a' + #9 + 'b', mtInformation, [mbOk], 0);

places a tab space beween 'a' and 'b' when run on Windows XP, but not Vista.

In Vista the 'a' and 'b' are side by side.

Any suggestions on how to get the tab space working in Vista
Dennis_TreacyAsked:
Who is Participating?
 
Geert GOracle dbaCommented:
use string formatting with a width specifier

lineoftext := format('%10:10s %20:20s %10:10s', [Field1, Field2, Field3]);

This will align all columns and cut them to the desired length.

put a - to left align

see delphi help Formatting strings for more intel
0
 
BigRatCommented:
This has something to do with the new text rendering system in Vista. Is it absolutely necessary to have a tab, wouldn't a number of spaces be just as effective?
0
 
Dennis_TreacyAuthor Commented:
The actual code in the application can has a number of rows of information and it need to be aligned
0
 
Dennis_TreacyAuthor Commented:
Thanks.
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.

All Courses

From novice to tech pro — start learning today.