Solved

Tab #9 in messagedlg not working in Vista

Posted on 2008-10-09
4
555 Views
Last Modified: 2010-04-05
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
Comment
Question by:Dennis_Treacy
  • 2
4 Comments
 
LVL 27

Expert Comment

by:BigRat
Comment Utility
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
 

Author Comment

by:Dennis_Treacy
Comment Utility
The actual code in the application can has a number of rows of information and it need to be aligned
0
 
LVL 36

Accepted Solution

by:
Geert Gruwez earned 500 total points
Comment Utility
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
 

Author Comment

by:Dennis_Treacy
Comment Utility
Thanks.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now