Dear Vixens and Reynards:
I am adjusting forms to not use the keyboard command. (This is
cleanup prior to making other changes.)
On one form, the first control on the page is trndate. The
gotfocus for it contains code to select the day portion of the
date. The problem is that it does not always work.
It works on entry to the form, but not after an error.
My testing is to tab along until I am out of the top part of
the form. The sets off an OK which because the particular work order
that would be selected is no longer usable results in an error. A
messagebox is displayed then focus is set back to the transaction
date control. Although the gotfocus is executed, the selection does
not happen. If I then tab off and backtab on, it does work.
Note that the problem seems to be only right after the focus
moves off the form.
I tried tracking events and the order of events seems weird.
What can I do to get the gotfocus to work?
***** Start of Commented Event Dump *****
47798.530, screen.LostFocus()
47798.530, cwktform.pf.page1.Activate()
47798.530, cwktform.Activate()
47798.530, cwktform.GotFocus()
47798.530, cwktform.pf.page1.trndate.GotFocus()
The selection works here.
47798.530, cwktform.pf.page1.trndate.theget.GotFocus()
I tab out.
47799.655, cwktform.pf.page1.trndate.theget.Valid()
47799.655, cwktform.pf.page1.trndate.theget.LostFocus()
47799.671, cwktform.pf.page1.trndate.LostFocus()
47799.671, cwktform.pf.page1.obj1.GotFocus()
47799.671, cwktform.pf.page1.obj1.theget.GotFocus()
47800.046, cwktform.pf.page1.obj1.theget.Valid()
47800.046, cwktform.pf.page1.obj1.theget.LostFocus()
47800.046, cwktform.pf.page1.obj1.LostFocus()
47800.046, cwktform.pf.page1.obj2.GotFocus()
47800.046, cwktform.pf.page1.obj2.theget.GotFocus()
47800.593, cwktform.pf.page1.obj2.theget.Valid()
47800.593, cwktform.pf.page1.obj2.theget.LostFocus()
47800.593, cwktform.pf.page1.obj2.LostFocus()
47800.593, cwktform.pf.page1.obj3.GotFocus()
47800.593, cwktform.pf.page1.obj3.theget.GotFocus()
47801.499, cwktform.pf.page1.obj3.theget.Valid()
47801.499, cwktform.pf.page1.obj3.theget.LostFocus()
47801.499, cwktform.pf.page1.obj3.theget.Valid()
47801.499, cwktform.pf.page1.obj3.theget.LostFocus()
47801.499, cwktform.pf.page1.obj3.LostFocus()
47801.499, cwktform.LostFocus()
This must be where the messagebox() is displayed. Focus is set back
to the trndate textbox.
47801.499, form.Activate()
47801.499, form.GotFocus()
47802.831, cwktform.GotFocus()
47802.831, cwktform.pf.page1.trndate.GotFocus()
The selection does not work here.
47802.831, cwktform.pf.page1.trndate.theget.GotFocus()
Note how this activate is after that of the control. This did not
happen above.
47802.831, cwktform.pf.page1.Activate()
47802.831, cwktform.Activate()
Tab out.
47804.112, cwktform.pf.page1.trndate.theget.Valid()
47804.112, cwktform.pf.page1.trndate.theget.LostFocus()
47804.112, cwktform.pf.page1.trndate.LostFocus()
47804.112, cwktform.pf.page1.obj1.GotFocus()
47804.112, cwktform.pf.page1.obj1.theget.GotFocus()
Backtab in.
47805.003, cwktform.pf.page1.obj1.theget.Valid()
47805.003, cwktform.pf.page1.obj1.theget.LostFocus()
47805.003, cwktform.pf.page1.obj1.LostFocus()
The selection works here.
47805.003, cwktform.pf.page1.trndate.GotFocus()
47805.003, cwktform.pf.page1.trndate.theget.GotFocus()
47805.503, cwktform.pf.page1.trndate.theget.Valid()
47805.503, cwktform.pf.page1.trndate.theget.LostFocus()
47805.503, cwktform.pf.page1.trndate.LostFocus()
47805.503, cwktform.pf.page1.obj1.GotFocus()
47805.503, cwktform.pf.page1.obj1.theget.GotFocus()
47807.112, dorebar.btnexit.GotFocus()
47807.347, dorebar.btnexit.Valid()
47807.347, dorebar.btnexit.LostFocus()
47807.347, screen.Activate()
47807.347, screen.GotFocus()
47809.378, screen.LostFocus()
***** End of Commented Event Dump *****
Sincerely,
Gene Wirchenko
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.