Hi, Guys
I have what appears to be a simple question - How to you load a panel (created and saved using Designer) onto a B4X page?
I have tried the following code and it does not show the new panel.
Basically, the old panel1 vanishes (as expected) but the new panel does not appear.
Some help, or a pointer a previous post, would be much appreciated.
Very kind regards
Dave
I have what appears to be a simple question - How to you load a panel (created and saved using Designer) onto a B4X page?
I have tried the following code and it does not show the new panel.
My code to load panel:
Private Sub B4XPage_Created (Root1 As B4XView)
Log("B4XAddPlayer_Created")
Root = Root1
Root.LoadLayout("frmAddPlayer") ' This is the B4X page - this bit works as expected.
panel1.visible = false ' This hides the original panel added to frmAddPlayer.
' This is my code - it was taken from Eric's example loading panels into customerlistview
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 280 , 290)
p.LoadLayout("pnlAddPlayer") ' This is the Panel containing a few views.
p.BringToFront ' My bit just to make sure it appears on top
p.Visible = True
End Sub
Basically, the old panel1 vanishes (as expected) but the new panel does not appear.
Some help, or a pointer a previous post, would be much appreciated.
Very kind regards
Dave