Form1 shows an alert which contains Form2 as the body :
from anvil import *
from Form2 import Form2
class Form1(Form1Template):
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
def form_show(self, **event_args):
"""This method is called when the column panel is shown on the screen"""
alert(Form2(),buttons=[])
Form2 contains a button and the following code :
from anvil import *
class Form2(Form2Template):
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
def button_1_click(self, **event_args):
"""This method is called when the button is clicked"""
self.raise_event("x-close-alert",10)