Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MaxLength and EditBoxes Probable Bug?
Message
 
 
To
10/04/2003 14:29:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00776258
Message ID:
00776414
Views:
19
Hi Tim,

I see a litle bit different behavior. I copied 140 bytes multiline text into clipboard and pasted it into textbox until VFP allowed me to. After that I checked some values:
LEN(_CLIPTEXT)       140
LEN(Edit1.Value)   4,704
# of CRLF's          784
It looks like VFP dosn't count CRLF's into MaxLenght when Paste is used. After I typed any character into editbox, Edit1.Value was truncated to 4,000 characters. My conclusion is, that there's a bug when text with CRLF's is pasted into editbox. VFP allows to paste more characters than allowed by MaxLenght property.

>Anyone seen this behavior?
>
>In vfp 8 I take an edit box and set the maxlength=4000
>then I take some text with a cariage return in it like.
>
>"TEST
>TEST
>TEST
>"
>
>Then I proceed to paste it into the editbox until it wont allow me anymore. At this point I just hold any key down until the editbox stops me.
>
>If I tab out and check the length then it will be over 4000. (varies but from 4050-4150)
>
>In vfp7 this does not happen but if the vary last character is a carriage return then it will go to 4001.
>
>I'm gonna try to do something in the interactive change but it sucks these properties dont work..
>
>Perhaps the enter chariage return line feed is counted as one when it should be two? CHR(10)+CHR(13)
>
>BR
>Tim
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform