Dear Vixens and Reynards:
I am doing some clean-up of forms. On one form's date control,
on entry to the field, the cursor should be set to just before the
day part of the date. I was previously doing this with the keyboard command.
I had tried .selstart and .sellength, but it did not work. It
turns out that .gotfocus is the wrong event for it. It is .activate
that you have to put the selection code in.
This worked fine in tests.
Unfortunately, in the form, this is the first control. For
some reason, it does not work. If I swap the first two controls,
then it does work. This will not be acceptable for the production app though.
The .activate code does execute, but it does not
select. Instead, the cursor is positioned at the beginning of the field.
How do I get .selstart and .sellength to work right?
I suppose it could be something in my form framework code, but
I have been wrestling with this this morning, and if it is a VFP
quirk instead one of my code, I would waste a lot of time for nothing.
I do .setfocus() to the first control that can accept
input. Surely this means that .activate will fire and execute correctly?
Any help would be greatly appreciated.
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.