The Created Window Affects the Calling Window

Previous Next

See Also

To let the created window affect the calling window:

1. From the Windows Designer catalog, open the to be created window.
2. Open the Object Activator.
3. In the object pane of the Object Activator, select the window object at the top.
4. Click the Properties tab page.
5. Click the New button.
6. Define a user-defined property of the calling window type. You are advised to use a consistent naming convention.


Suppose the calling Bookings window opens the created Days window. For the Days window, define a user-defined property UDPBookings of type: Bookings.

7. From the Windows Designer catalog, open the calling window. In the example, this is the Bookings window.
8. Insert a button, and set the Action property to:

<created window>( Self() ).Window.Create()

This method call:

· Opens the window that is to be created.
· Sends the calling window as value to the user-defined property of the created window, within the Self() keyword.

You can use the Object Activator to construct this method call. For a Travel Agency example that explains how to do this, see: Actions Example 11.


In the Bookings and Days example, the corresponding method call is:

Days( Self() ).Window.Create()

9. From now on, the created window can affect the calling window.


To set the background color of the Bookings window to red, insert a button in the Days window, and set the Action property to:

UDPBookings.background( red )