Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox readonly problem
Message
From
31/03/2004 10:05:30
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Textbox readonly problem
Miscellaneous
Thread ID:
00891159
Message ID:
00891159
Views:
53
In my foundation textbox class, if I want to prevent a user changing the value I prefer to make it readonly rather than disabled. The main reason for this is that if the current value is too long for the visible area of the control, the user can still press the right-arrow or end-key to see the full contents (or press Ctrl+c for copying). The downside of this approach is that pressing enter or tab to exit field fires the valid event, often running unnecessary code and sometimes having undesired effects.

One way round this problem is to check for this.readonly=.F. before running validation code, but this would be a pain for every valid event (or lostfocus, come to think of it) which has code.

Apart from making the control disabled instead of readonly, is there any other way around this problem? BTW, I am using VFP7.

Any help would be appreciated.

Alan
Next
Reply
Map
View

Click here to load this message in the networking platform