Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Order of object creating for a form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00231124
Message ID:
00232063
Views:
23
> Yep, believe it or not that's how it works. Take a look at the Hacker's Guide to VFP3 or 6, the entry for ZORDER describes what it is and how it is related to event processing. You are correct in the default case, the initial ZORDER *is* determined by the order in which an object is added.
> When you add a new object to a form it is by default added at the top of the ZORDER stack(stored as the order of records in the SCX/VCX). I'm not sure what you mean by ZOrder=0 for a new object, there is an exposed ZOrder method that can have 0 as its parameter (which means put the chosen object at the top of the stack(fire its events last)). As Ted+Tamar note, VFP's developers had to control the order in which events fire somehow, and this is the approach that they chose.
> You can test the behavior by adding a few objects to a form with DEBUGOUT statements in their Init's. By choosing each object in turn, invoking "Send to Back" and then instantiating the form, you will see that you are actually changing the order in which the control's Init methods are being fired.

Yes, as I posted a little after my previos post, you're right, though I would hesitate to call it Zorder, that had me confused. I think "Intra-Container Object Instantiation Order" (though rather long-winded) is the better description, Zorder seems an arbitrary and rather meaningless word, besides the fact there is a method called the same...

But it does work exactly as you say...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform