JonPM Well-Known Member Licensed User Longtime User Dec 3, 2015 #1 Is there a way to remove a specific page from the stack: Page 1 > Page 2 > Page 3 > Page 4 While on Page 4, remove Page 2? Last edited: Dec 3, 2015
Is there a way to remove a specific page from the stack: Page 1 > Page 2 > Page 3 > Page 4 While on Page 4, remove Page 2?
Erel B4X founder Staff member Licensed User Longtime User Dec 3, 2015 #2 You can call: B4X: NavControl.SetPagesStack(Array (Page1, Page3, Page4)) Upvote 0
JonPM Well-Known Member Licensed User Longtime User Dec 3, 2015 #3 Is there a way to get the current stack? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 3, 2015 #4 Try this: B4X: Dim no As NativeObject = NavControl Dim Pages As List = no.GetField("viewControllers") Upvote 0
Try this: B4X: Dim no As NativeObject = NavControl Dim Pages As List = no.GetField("viewControllers")
JonPM Well-Known Member Licensed User Longtime User Dec 3, 2015 #5 Great, that works. Just have to add each page title in designer, or page.Title in code AFTER the layout is loaded Upvote 0
Great, that works. Just have to add each page title in designer, or page.Title in code AFTER the layout is loaded
JonPM Well-Known Member Licensed User Longtime User Dec 3, 2015 #6 One more question: Generally pages are declared Private. But to use your SetPagesStack code above each page should instead be Public? Any issues with declaring pages as global objects? Upvote 0
One more question: Generally pages are declared Private. But to use your SetPagesStack code above each page should instead be Public? Any issues with declaring pages as global objects?
Erel B4X founder Staff member Licensed User Longtime User Dec 3, 2015 #7 JonPM said: Any issues with declaring pages as global objects? Click to expand... No. Upvote 0