General information
Category:
Forms & Form designer
Hi Jill,
I have an idea which may work. In the GotFocus event of the textbox, say:
this.value=repl(chr(10),17)
=insm(.f.)
In the KeyPress event, say:
if nkeycode=7 or nkeycode=127
this.value=trim(this.value)+chr(10)
endif
In the Valid event, say:
=insm(.t.)
I am using a double-byte character version of VFP6 and chr(10) works. In Enlish verson, chr(10) may not work, in which case you may have to use a different character which is not visible and is not expected to be keyed in. The textbox's SelectOnEntry should be set to .f.
BTW, the length of value (17) is dependent on the lenth of the textbox and its font size, unless the MaxLength is given.
CY
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only