B4J Question B4XPages - Title of page

Johan Schoeman

Expert
Licensed User
Longtime User
I have never worked with B4XPages and busy trying to convert a standard B4J project to B4XPages. Still very confused about B4XPages.

I load a layout to a B4XPage (Page 4). Title in the layout is for eg "XXXXXX". The layout also includes an Icon to be displayed to the left of the title. But when I run the B4XPages project the Title is changed to "Page 4" (the page that I am loading with title in the layout set to "XXXXXX") but it nevertheless shows the Icon.

So, in the code of Page 4 I have to change the title programmatically:

B4XPages:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    
    Root.LoadLayout("Sales")

    B4XPages.SetTitle(Me, "XXXXXX")

Why does it not keep the title of the original layout ("XXXXXX") but keeps the Icon that was set in the layout? Or am I just being stupid here with what I am doing?
 

Xfood

Expert
Licensed User
You can hide it from the main activity (#IncludeTitle: False) or in the manifest editor. It will remove it from all pages.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Check the tutorial


It’s mentioned in point 10.

Edit: You need to set the title with code. The title in layout is not working.
 
Last edited:
Upvote 0
Top