I have a simple web app that needs to display different pages based on a selection from a listbox. So I have defined two WebContainers one called Collector and One called Accelerator. Each have some buttons and labels nothing complex and all for display. When the user selects Collector the screen shows the Collector Container. When the user selects the Accelerator the Accelerator Container is displayed on top of the Collector Container instead of clearing it.
How do I clear it? I have been able to add a button in each container with a pressed event and the code “self.close”. This has the right effect but the user has to click it before switching screens. How can I get this to run when the user selects the alternate WebContainer. Below is the code that selects the containers when clicked from a listbox.
Var Conr1 As New Collector
Var Conr2 As New Accelerator
Generic1.Close
Var Generic1 As New Generic
Generic1.LockLeft = True
Generic1.LockTop = True
Generic1.Width = 1191
Generic1.Height = 606
Generic1.top = 20
Generic1.left=405
Generic1.EmbedWithin(Self, 405, 20, Generic1.Width, Generic1.Height)
if data = "Collector" then
Conr1.LockLeft = True
Conr1.LockTop = True
Conr1.EmbedWithin(Generic1, 405, 20, Conr1.Width, Conr1.Height)
end if
if data = "Accelerator" then
Conr2.LockLeft = True
Conr2.LockTop = True
Conr2.EmbedWithin(Generic1, 405, 20, Conr2.Width, Conr2.Height)
end if