remove views not working?

ajk

Active Member
Licensed User
Longtime User
I have created table using code from this example:

http://www.b4x.com/forum/basic4andr...7684-gridline-tableview-using-scrollview.html

Later I try to remove all elements with:

For i = Activity.NumberOfViews - 1 To 0 Step -1
Activity.RemoveViewAt(i)
Next

and when I try to execute:

Activity.AddView(Et4, 2dip, 2dip, 150dip, 40dip)

I receive message: The specified child already has a parent. You must call removeView() on the child's panel first.

I do not get the reason: sthg on activity have to be removed before Activity.AddView... ?
 
Last edited:

Ricky D

Well-Known Member
Licensed User
Longtime User
I had the same problem when I unload one of my classes.

What you need to do is remove all views off panels then remove the panel.

Regards, Ricky
 
Upvote 0
Top