aharrisreid
Programmer
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
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