Android Question Dim Page AddPage And ShowPage in every event on click B4xPages

netsistemas

Active Member
Licensed User
Longtime User
Is this correct in B4XPages?

B4X:
Sub btHerramientas_Click
    Dim PaginaMenuHerramientas As PageMenuHerramientas
    PaginaMenuHerramientas.Initialize
  
    B4XPages.AddPage("PaginaMenuHerramientas",PaginaMenuHerramientas)
    B4XPages.ShowPage("PaginaMenuHerramientas")
End Sub


or is better define var and addpage only 1 time.
This question are related with number max of pages (no limite, ok) and easy cost.
But, maybe if one page are not use by user is better no load, and if lunch 'n' times the coste, is bud repit the code?
 
Last edited:

Geezer

Active Member
Licensed User
Longtime User
I believe you add the page one time, in the b4xmainpsge and just show as required.

Do a forum search. There is an page example
 
Upvote 0

netsistemas

Active Member
Licensed User
Longtime User
Yes, you say de correct, but only i find other methods to do it, and undersdand more this code.
i don't know xamarín or other product, but this is great!!
 
Upvote 0

netsistemas

Active Member
Licensed User
Longtime User
a link to this help are recomended put in a NEW PROYECT template when is create new proyect b4xPages!!! (Thanks ,Klaus).
(for clueless like me )
 
Upvote 0
Top