Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why click twice to get past valid event
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Why click twice to get past valid event
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01044258
Message ID:
01044258
Views:
51
I have a form with a grid and a ADD, Save, Delete buttons. The ADD changes to Cancel. Why do I have to click twice on the Cancel button to cancel an ADD? here is the code in my valid event. In debug, the grid text shows focus and not the clicked button. Here is the valid event code:
* get reference to object under mouse pointer
oLoc = sys(1270)
if vartype(oLoc)="L"
	oLoc = This
endif

* is the location the Close or the Add/Cancel button
IF inlist(lower(oLoc.name),"cmdclose","cmdAdd")
    RETURN .T.
ELSE 
    SomeCode
ENDIF
Thanks, Chuck
Extreme Programming = Plan -> Design -> Code -> Test
Next
Reply
Map
View

Click here to load this message in the networking platform