>>>>Checking on Keypress event? InputMask?
>>>
>>>Ok, just found, that my solution doesn't work.
>>>
>>>If anyone knows, how to solve this problem?
>>>
>>>BTW, another strange thing I noticed: if I paste some text in the field (Ctrl+V), the KeyPress of this field is no longer firing even if I try to change some letters...
>>
>>I added a new class property StopNow. In InteractiveChange I put this code:
>>
>>
>>if len(alltrim(this.text))>=this.maxlength
>> this.StopNow = .t.
>> nodefault
>>endif
>>
>>In KeyPress:
>>lparameters nKeyCode, nShiftAltCtrl
>>if this.maxlength > 0
>> if between(m.nKeyCode,9,13)
>> this.StopNow = .f.
>> endif
>>endif
>>
>>And in LostFocus
>>if this.StopNow
>> nodefault
>>endif
>>
>>This seems to fix the problem. Do you have better idea?
>
>Yes, you might change between() for inlist() <g>.
>
>Hilmar.
Thanks. :) Today is a tough day for me. I was distracted from my work every 5 minutes. I haven't yet done, what I planned yesterday...
Also in the morning I spent about 1h. trying to organize the Russian team for UT tournament. It's a really hard task, when you need to answer 7+ e-mails to different persons...
Thanks again.
If it's not broken, fix it until it is.
My Blog