Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there any danger in change the method event flow?
Message
From
27/08/1999 10:31:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Is there any danger in change the method event flow?
Miscellaneous
Thread ID:
00258407
Message ID:
00258407
Views:
48
In a grid I use a currency field. But I want it have some special behavior. For example when i'm going to input the value -500.00, the normal approach would be for the user to type -500 and then Enter or Tab. But I have done a method that saves one keystroke. The user can type just 500- and get the same result. The following code has I put in the KeyPress method of the textfield and it just works just perfect. But by doing this there seem to be a lot of events that dosn't fire. Is there any danger in this? Is there some importent "background" code that dosn't execute?

KeyPress Method:
LPARAMETERS nKeyCode, nShiftAltCtrl

do case
case nKeyCode = 43 && +
This.Valid(13, .F.)
This.LostFocus() && LostFocus has the code the moves me to the next field
NoDefault
return .f.
case nKeyCode = 45 && -
This.Valid(13, .T., This.Value)
This.LostFocus()
NoDefault
return .f.
endcase

/Mårten Törnquist
---( Mårten Törnquist )---
Next
Reply
Map
View

Click here to load this message in the networking platform