Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Messageboxes
Message
From
02/10/1998 12:22:40
 
 
To
02/10/1998 09:02:12
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00142123
Message ID:
00143315
Views:
31
>>>>
>>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform