Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 605
  • 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 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
 
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.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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