The Page 2 page in the application can be opened several times
in one session and the page title needs to change
depending on the mode1 variable, but this only works the first
time.
xui.MsgboxAsync shows the correct value of the variable every time,
but the page title only changes when the page is opened for the first time
I tried changing the Label.Text - it doesn't work either
How to solve this problem?
code:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("Page2")
xui.MsgboxAsync(Main.mode1,"MODE:")
Select Case Main.mode1
Case 1
B4XPages.SetTitle(Me, "Mode 1")
Case 2
B4XPages.SetTitle(Me, "Mode 2")
Case 3
B4XPages.SetTitle(Me, "Mode 3")
Case 4
B4XPages.SetTitle(Me, "Mode 4")
End Select
End Sub
Select Case Main.mode1
Case 1
B4XPages.SetTitle(Me, "Mode 1")
Case 2
B4XPages.SetTitle(Me, "Mode 2")
Case 3
B4XPages.SetTitle(Me, "Mode 3")
Case 4
B4XPages.SetTitle(Me, "Mode 4")
End Select