Sub PanPop (mlayout As String, hc As Int, wc As Int) '( mlayout=your .bal file, hc=height offset + or -, wc=same for width )
pnlSelect.Initialize ( "Select")
pnlInput.Initialize ("")
pnlInput.LoadLayout ( mlayout )
pnlSelect.Color = Colors.ARGB (150,0,0,0)
Activity.AddView (pnlSelect, 0, 0, 100%x, 100%y)
mh1=(pnlSelect.Height/2) - (PanelMain.Height/2) + hc
mw1=pnlSelect.Width/2 - (PanelMain.Width/2) + wc
mh2=PanelMain.Height
mw2=PanelMain.Width
pnlSelect.AddView (pnlInput, mw1, mh1, mw2, mh2)
End Sub