Hi.
ok, so your “Main” dashboard page needs a content_panel (let’s name it “cpMain”).
You also need a Module (not a server module) - let’s call it “GlobalModule”. In there declare a variable -
main_form=None
In your Main form, add
import GlobalModule
and also this line -
def __init__(self, **properties):
# You must call self.init_components() before doing anything else in this function
self.init_components(**properties)
# Any code you write here will run when the form opens.
GlobalModule.main_form=self # <---------Add this line
Now you have a globally accessible reference to this specific form , and you can manipulate it and any controls inside it from any other form as required. For example, in your navigation form -
import GlobalModule
...
GlobalModule.main_form.cpMain.clear()
GlobalModule.main_form.cpMain.add_component(....etc)
Does that help?
EDIT -
What Ian suggested as well in this link -
was to define a function in the Global Module to hide the actual implementation of showing the form. Something like this (untested) -
def ShowCustomers():
main_form.cpMain.clear()
main_form.cpMain.add_component(<<formname>>)
So from within your Navigation form you could just call -
GlobalModule.ShowCustomers()
That’s the idea, anyway. There’s probably a better way to implement that.