• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 603
  • Last Modified:

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
0
Dennis_Treacy
Asked:
Dennis_Treacy
  • 2
1 Solution
 
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
 
Geert GruwezOracle 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
 
Dennis_TreacyAuthor Commented:
Thanks.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now