...EDIT

AddLineFeeds

This property was added in VFP 6 Service Pack 3 to address an issue in manipulating edit box data. It allows you to specify whether return characters (CHR(13)) automatically turn into return plus linefeed (CHR(13) + CHR(10)) when edit box data is moved to its ControlSource.

Usage

edtEditBox.AddLineFeeds = lAddLineFeeds lAddLineFeeds = edtEditBox.AddLineFeeds
In older versions of VFP and by default in recent ones, whenever the value of an edit box is moved to its ControlSource and whenever the edit box loses focus, a linefeed character is added to follow each return character (one per return—they don't keep accumulating). This ensures that the data will display correctly in pretty much any application, since some like CHR(13), others like CHR(10), and some require both.

However, when you add the linefeed character, it fouls up operations involving LEN() and other position-based values, like SelStart and SelLength. (For example, you might be setting SelStart and SelLength to highlight particular data in the edit box. When the linefeed is added, your positions are off.) Microsoft heard our entreaties on this front, and added this property, which allows us to just say no to linefeeds.

Example

* You're most likely to set this one in the Property Sheet * but, if it were code, you'd do something like: This.AddLineFeeds = .F.

See Also

Chr(), EditBox, Len(), SelLength, SelStart


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net