Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically Send To Back?
Message
From
18/08/2003 16:19:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00820928
Message ID:
00821183
Views:
27
>>>>>Can we "Send To Back" programatically?
>>>>
>>>>Try ZOrder.
>>>Thanks - I was also thinking that the ADDOBJECT sequence might affect it!
>>
>>Actually, I think it does. This sounds strange, but it is easy to verify (with a WAIT WINDOW or MESSAGEBOX() in the Init() of two objects): sending an object to back in the form designer will put it first in the initialization sequence.
>
>I don't think so. Forms created with the Form Designer has it's objects instanciated in the order they were placed on the form, regardless of the ZOrder.

Then, please explain the results of the following experiment.

Create a form. Add two TextBoxes. Add the following methods:
* TextBox1.Init():
MessageBox("Init TextBox 1")

* TextBox2.Init():
MessageBox("Init TextBox 2")
Send TextBox1 to back, and run the form. You will see the messages for TextBox #1, and then for TextBox #2.

Now, send TextBox2 to back, and run the form again. Now, you will see the message for TextBox #2 first.

Tested in VFP 6, no service packs.

Any comments?
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform