Solved

Tab #9 in messagedlg not working in Vista

Posted on 2008-10-09
4
573 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
ID: 22686510
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
ID: 22691552
The actual code in the application can has a number of rows of information and it need to be aligned
0
 
LVL 37

Accepted Solution

by:
Geert Gruwez earned 500 total points
ID: 22700665
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
ID: 22708275
Thanks.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

790 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