I understand.
But this panel is not loaded when I load my main layout.
if I were to do a sPI_Partners_Main.LoadLayout("sPI_PartnersList") I would crash because sPI_Partners_Main is NOT Initialized
I guess I'm just not explaining it right. So let me try again.
I have a splayerinfo.bal which is loaded with Activity.LoadLayout("splayerinfo") and contains about 50 different buttons, toggles, etc
I also have spi_partnerslist.bal which I only need to load when needed and contains the 5 screen fields described above
Now sPI_Partners_Main is in the spi_partnerslist.bal file so it was created with designer but because I haven't loaded the .bal file is isn't initialized
It's NOT initialized because I haven't loaded the .bal file so I can't do a LoadLayout on it because it's not initialized, and if I initialize it then I get the warning that it is initialized in designer.
Hench I did the following code to get around it:
If sPI_Partners_Main.IsInitialized = False Then
Dim LoadPanel As Panel
LoadPanel.Initialize("")
mPlayerInfoPanel.AddView(LoadPanel, 0, 0, 100%x, 100%y)
LoadPanel.LoadLayout("sPI_PartnersList")
sPI_Partners_Main = LoadPanel.GetView(0)
end if
HOW do you load a layout that is NOT part of the Activity Layout