Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determing form size necessary to display arbitrary text
Message
From
31/10/2001 13:16:18
 
 
To
31/10/2001 06:25:21
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00575284
Message ID:
00575757
Views:
32
Claudio,

Thanks again for your help and creative ideas. Here's what I've decided to do inspired by your suggestion (and the feedback of others as well):

To determine the number of rows required to display a word wrapped text string in a form of a given width, I'm going to use the GetWordNum() function of VFP 7 and build each word wrapped line one at a time. I will keep adding words to a line until txtwidth() * fontmetric( 6 ) becomes greater than the form width at which point I will start building another line. Plus I'll add some logic for handling carriage returns and linefeeds.

Regards,
Malcolm

>Hi Malcom;
>
>I really glad to help you to find the answer of your need.
>
>>the edit control does not have an Autosize property. The label control has an autosize property, but its text value must be less than 256 characters.
>
>The fontmetric(7) gives you the maximun width (in pixels) of a single character. You can assembler your form using this like the main coordinate for your form's width.
>
>
>Claudio
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform