B4J Question Add New Page

AndroidMadhu

Active Member
Licensed User
Hi,
I have added a new Page as below :
1677826133376.png


Now I want to declare the page like below

B4X: Copy
Private Page2 As B4XPage2
Page2 = B4XPages.GetPage("Page 2")

Where to declare these lines? Is it at B4XMainPage or Main

Thanks
 
B4xMainPage. You need to initialize and add the page to the page manager too
Code: Copy
Dim aPage As pgPage2
aPage.Initialize
B4XPages.AddPageAndCreate("Page2", aPage)
 
Upvote 1
I'm glad you solved your problem.
Thank you for the "like" at my post. Generally, we use to modify the title adding an initial "[solved]" indication to make it easier for others to find threads with a solution.
Recently @Erel added the option to vote a post as a solution; this too is an indication for others to watch there for a working solution.

Personally, I find that a simple "thank you" is more than enough (afterall this is a community where we help each other just because we like to do it), but I understand that adhering to the forum practices makes it simpler for others, so why not? :)
 
Upvote 0
Back
Top