Sub AddPanelBeforeLabel(lbl As Label)
Dim p As Panel
p.Initialize("")
Dim parent As Panel = lbl.Parent
parent.AddView(p, lbl.Left, lbl.Top, lbl.Width, lbl.Height)
p.SetBorder(2, Colors.Red, 4)
lbl.RemoveViewFromParent
p.AddView(lbl, 0, 0, p.Width, p.Height)
End Sub