Both Windows Affect Each Other |
Assume, one window contains a button that opens another window by performing a Window.Create() call. The window that contains the button is the calling window, and the window that is opened is the created window. After creation, both windows can affect each other; a two-way window interaction can be set up. To set up a two-way window interaction:
Example Suppose the calling Bookings window opens the created Days window. For the Days window, define a user-defined property UDPBookings of type: Bookings.
Example Suppose, the calling Bookings window opens the to be created Days window. For the Bookings window, define a user-defined property UDPDays of type: Days.
<UDPCreated>( <created window>( Self() ).Window.Create() ) This method call:
Example In the Bookings and Days example, the corresponding method call is: UDPDays( Days( Self() ).Window.Create() )
Example To set the background color of the Days window to red, insert a button in the Bookings window, and set the Action property to: UDPDays.background( red ) To set the background color of the Bookings window to red, insert a button in the Days window, and set the Action propre to: UDPBookings.background( red ) CAUTION: In this situation, if the user closes one of the two windows, the other window still contains a reference to the closed window in its user-defined property. To deal with this, refer to help topic: "Clearing the Reference To a Closed Window". |