Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Edit box selects all text -- BAD IDEA!!
Message
From
17/06/1999 00:08:59
 
 
To
16/06/1999 22:09:47
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00230545
Message ID:
00230724
Views:
26
Hi Peter,

By default, most VFE controls (at least the ones I've looked into) set the Format property to "K" (as outlined by Menachem) if you don't specify something else.

You'll need to look at your Data page settings if you're using the data dictionary in Active mode, or set the value directly in the class if not. I usually set it to something harmless like "R".

>>>An old pet peeve -- but now the client has told me I need to deal with this.
>>>
>>>The user tabs to an edit box. (I have a notes box on most of my forms.) All of the text is selected. If the user presses enter or just about any key besides tab at this point, ALL OF THE PREVIOUS NOTES ARE WIPED OUT.
>>>
>>>Setting property SELECTONENTRY to true or false seems to have no effect on this behavior. If I set SELSTART to 9999 and tab to the edit box, it is reset to 0 and the SELLENGTH property is set to the length of the text in the box.
>>>
>>>There must be a way to fix this.
>>>
>>>Peter Robinson
>>
>>Pete, what is the FORMAT property of the edit box? If it is K, that is what you need to remove. The K means select on entry...
>
>Hi, Menachem.
>
>Thanks to everyone for pointing out that what I'm describing is not standard edit box behavior. I confirmed that for my own satisfaction.
>
>The edit box in question has no format characters. BUT, it is based on the class EDTDBCX which comes with Visual FoxExpress and not the base EDITBOX class. EDTDBCX is probably a Codebook class. I can dig into the class code to see why it behaves differently. I will also mention this in the VFE support conference.
>
>As a quick fix, I have set the tab stop property to False. This forces the user to click on the edit box in order to add notes which does not create a problem.
>
>Peter
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform