Android Question [B4XPages] Delete view, dynamically created.

vecino

Well-Known Member
Licensed User
Longtime User
Hi, how can I delete a view created dynamically?
Thank you.

B4X:
Sub Label6_Click
    Dim pnTr As Panel
    pnTr.Initialize("pnTr")       
    pnTr.Elevation=3dip
    pnTr.Tag=1   
    '   
    Root.AddView(pnTr,0,0,100%x,100%y)   
End Sub

Sub pnTr_Click
    For Each v As B4XView In Root.GetAllViewsRecursive
        If v Is Panel Then
            Dim pn As Panel = v
            If 1=pn.Tag Then
                pn.RemoveView
                Exit
            End If
        End If
    Next
End Sub
 

vecino

Well-Known Member
Licensed User
Longtime User
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…