Pages objects and the activate event
2006-06Jun-01
The Activate event of a page fires under the following circumstances:
When you switch to another
page either by clicking onto the tabs, or by using Ctrl+Tab. However, the
Activate event doesn't fire for the initially displayed page. The exception
to this rule results from the next one. The Activate event of the first
pageframe (in object order) on the form fires.
When a form is activated,
VFP triggers the Activate event of the first page frame in object order on
the form. One pageframe might be the active one (that is, has got the
focus), but the Activate event for the first pageframe always fires. The
current focus is not related to the Activate event, even though it seems to
be a natural combination.
Sample code: <Activate.zip>
Object order refers to the order of objects of an class in the VCX. This is the same order in
which VFP creates objects. You can control the object order either by cutting
and pasting objects on a class, or by using the "Send to Background" and "Bring to
Foreground" features.