Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP5 EditBox: Any way to tell how many lines?
Message
From
12/08/1999 11:07:51
 
 
To
12/08/1999 10:31:21
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00250939
Message ID:
00252997
Views:
17
Sorry, I answered too fast without reading close enough. (I also replied once to the wrong message, not my day <g>)

Assuming your forms ScaleMode is set to pixels can you do something like this:

Get the width of the editbox.
Use FontMetric to get the average width for the font your using.
Multiply this average times the len(editbox.text) to get a width.
Divide this with by the number of columns (the width) in your editbox.
Round up.

>This doesn't seem to work for me, as it fails to take into account line wrapping within the editbox. (MEMLINES() is returning 2 for an edt that has 10 lines of wrapped text.
>
>-- jas
Previous
Reply
Map
View

Click here to load this message in the networking platform