Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Aligning multiple lines in Messagebox()
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Aligning multiple lines in Messagebox()
Divers
Thread ID:
00361690
Message ID:
00361690
Vues:
50
Hello All,
I'm trying to use Messagebox() to display multi line messages that contain formatted numerics, the problem I'm having is right aligning the numerics , this is one of the methods I've tried so far
cText = ''
nNumLines = 5

For i - 1 to nNumLines
    cText = cText + 'Some text goes here ' + Padl(nMyamount,15)
    cText = cText + Padl(nMyotheramount,15) + Chr(13)
EndFor

the problem seems to be that the text/amounts can vary in length, I've tried using Str()/Trans()/Allt() with limited success, any ideas?


*/ Typical data used

cMessageText = 'Withdrawn value is '
cMessageText = 'Total '

nMyamount = 1234.66
nMyamount = 23.66


nMyotheramount = 1000000.22
nMyotheramount = 1000.22


I would like it to appear in messagebox as:


Withdrawn value is 1234.66    23.66
Total           1000000.22  1000.22
Regards

Pete Kane
Regards,
Peter J. Kane



Pete
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform