Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Messageboxes
Message
De
02/10/1998 12:22:40
 
 
À
02/10/1998 09:02:12
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00142123
Message ID:
00143315
Vues:
32
>>>>
>>>>Won't work with proportional fonts...
>>>
>>>Yeah, but you don't have exacting control over messages using MESSAGEBOX -or- you could use FONTMETRICS to finely center it....soooo...this was a kludge solution that works better than nothing :-)
>>
>>Yeah, sometimes I miss good ol' DOS for it's simplicity.
>
>Don't tell me. I was playing with an alternative to MessageBox for weeks (DOS version took just a few hours), and all it had was a n editbox and a commandbutton group. Sizing them to fit was a pain (you may find it used in VPasns - the solitaire game I've sent), and guessing (read as "trying to calculate") the size of the editbox once it receives its text was the worst. I decided I could live with one extra line at the end, because the other choice was more extra lines or fewer lines than needed. The exact number of lines was impossible to get.

You could use TXTWIDTH to determine the length of lines at various cut-off points between words, but that's an awful lot of work just to determine the number of lines. We had to do our own "messagebox" like function because we needed more control over the buttons than the VFP one gives you. We just stuck to one fixed font to make our life easier to determine the number of lines, though. You would think that the VFP message box would have properties we could manipulate (like font, text on buttons, number of buttons, etc.), or at least parameters (parameter object?) to specify these types of things. Actually, a rich-text type of message area would be quite useful! Just dreaming, I suppose...
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform