Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EditBox mystery
Message
De
09/06/2014 13:44:53
 
 
À
09/06/2014 09:41:06
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01601421
Message ID:
01601505
Vues:
60
>>>I have two Editbox controls (on different forms) ; both have 'AddLineFeeds' set to true.
>>>
>>>In the interactive change event I'm checking the 'Text' value by outputting the ASCII values.
>>>
>>>In the first one if I type in 'Test' followed by 'Enter' the output is ; 84 101 111 116 13
>>>If I then type. say. an 'i' the output is : 84 101 111 116 13 10 105 (i.e the '10' has been inserted)
>>>
>>>In the second one the first output is the same (84 101 111 116 13)
>>>But, after the 'i' I get : 84 101 111 116 13 105 (i.e. no '10' has been inserted)
>>>
>>>What could cause the difference in behaviour ?
>>>(I want the first one)
>>
>>No one ?
>>
>>Reading the docs a little more carefully it appears that the 'AddLineFeeds' property only affects the read value of the 'Value' property - i.e. nothing to do with the 'Text' property. But that doesn't help me to discover what the difference is :-{
>
>The .text property is equivalent of .toString() function found in some other languages, i.e. it's the simple text equivalent of the value. Check how it behaves for other types of values;

Hmm - I'm only interested in straight text. The EditBox isn't bound so I wouldn't have thought 'Value' comes into it (although I could be wrong :-[)

IIRC it should behave like transform(). So whenever you ask for .text property, it seems to be running internally some kind of text_access method and giving you a representation of the value. May include stripping the LFs, as you just discovered.

But what I'm trying to discover is why one EditBox differs from the other in the content of the 'Text' property where the input is the same....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform