I am trying to produce a message of three lines each with two numbers in them and to make it tidier and more readable I would like to align the numbers in two columns like so
Line 1 some text ....123456.78....543210.43
Line 2 longer text........... 3.00..6453981.22
Line 3 text.................123.45.........78.99
but what I get looks like this no matter what I try
Line 1 some text 123456.78 543210.43
Line 2 longer text 3.00 6453981.22
Line 3 text 123.45 78.99
Which looks a mess specially as the numbers can range from 0 to over 1,000,000 - and in fact when I test this post in preview I have just the same problem unless I replace the spaces with dots.
Has anyone got any ideas? I've tried %1, #1######, formatting the numbers as strings but they still won't align properly
0
Comments
IF DIALOG.CONFIRM(Text001+Text002+Text003+Text004+Text005,FALSE,"Housing Allowance",gHseAmt,"Trans. Allowance",
gTrnAmt,"Other Allowances",gOthAmt,"No.") THEN UpdateAllowance;
The text constants are as follows:
Name ConstValue
Text001 %7 Current Calculated\
Text002 Housing : %1 %2\
Text003 Transport: %3 %4\
Text004 Other : %5 %6\\
Text005 Do you want to update record?
and the values are all decimals and despite the way it posts, the substitution markers are all lined up in columns in the text constants.
I should point
:-k
My thought would use FORMAT to convert to text.
Use STRLEN to get the length of the string.
subtract that from the largest possible # of characters you expect to have.
then you have a number of "dots" that you need.
not sure if it works with dialog boxes - but you can try.......
have a look at this post:
viewtopic.php?f=23&t=36219
http://www.BiloBeauty.com
http://www.autismspeaks.org
Its easier to develop good looking form i think
:thumbsup:
This is also how I would do it. Its really hard to get messages looking exactly as you need them, and Forms are cheaper than the customer paying you to write code and experiment.
Have a good weekend.