Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug: singleline EditBox with ReadOnly and ENTER
Message
 
 
To
08/05/2004 13:25:18
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00902211
Message ID:
00902302
Views:
14
Fabio,

>But if EditBox.ReadOnly is True this not occur
>( because into the internal C++ code the readonly is checked before the ENTER )

Pressing Enter (or any other keypress that would serve to change the value) inside a readonly editbox is always results in a keypress not allowed beep and the keypress is consumed by the control. The height of the editbox has nothing to do with it. You can verify this for yourself by adding this code to your test:
   ADD OBJECT edit3 AS editbox WITH ;
      Left = 142, ;
      Top = 80, ;
      ReadOnly = .T., ;
      Value = "CCCC"
>If you use a EditBox with a single single line
>VFP it interprets the text like a single line text.
>( a very usefull behaviour but not completed, UP/DOWN ... they lack )
>
>Result: the ENTER not split the text ,
>but it lose the editbox focus and jump into the next control on tab list.

I'm not sure I'd expect an editbox shorter than 2 * sysmetric(6) to work very well at all. Just use a textbox for single lines of input where carriage returns and multiple lines are not required.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform