Hello Friends:
I’m having trouble navigating from one Form to the next.
For conciseness, I elided much of the code for both Forms below.
The startup Form is called Main (inside package ./Forms), and it’s code is shown next. It’s purpose is to run login-logic, then quickly move on to the next Form, which is called LevelSelector (also inside package ./Forms).
from ._anvil_designer import MainTemplate
from anvil import *
import anvil.microsoft.auth
import anvil.server
import anvil.google.auth, anvil.google.drive
from anvil.google.drive import app_files
import anvil.users
import anvil.server
import anvil.tables as tables
import anvil.tables.query as q
from anvil.tables import app_tables
#
from ...util.helpers import login
from ..LevelSelector import LevelSelector
class Main(MainTemplate):
def __init__(self, **properties):
self.init_components(**properties)
login.attempt_login() # Completes user login, or logs them out.
open_form(LevelSelector())
Code for LevelSelector Form:
from ._anvil_designer import LevelSelectorTemplate
from anvil import *
import anvil.microsoft.auth
import anvil.server
import anvil.google.auth, anvil.google.drive
from anvil.google.drive import app_files
import anvil.users
import anvil.tables as tables
import anvil.tables.query as q
from anvil.tables import app_tables
class LevelSelector(LevelSelectorTemplate):
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.label_grade.bold = True
self.label_grade.visible = True
self.drop_down_grade.visible = True
print('Got Here!')
While the LevelSelector Form contains numerous components (more than is shown in the elided code above), it never renders.
When I run the above, the Output debug panel indeed prints ‘Got Here!’, however the LevelSelector Form never actually renders. That is, the Main Form still remains rendered.
With apologies for the basic question (I’m still getting familiar).
Any ideas or suggestions?
Thank you in advance.