Hi,
I have a scrollview, where I place panels and buttons.
Sometimes, I have to empty and refill it.
If it contains 5 items, and next time it needs only 3, the last 2 remain visible.
How can I remove all the panels before refilling?
Thank you
Peter
Dim Scrollcats As ScrollView
Scrollcats.Initialize(200)
Activity.AddView(Scrollcats, 250dip, -50dip, 400dip, 300dip)
' Scrollcats.Panel.RemoveAllViews : this has no effect
' Scrollcats.invalidate : this has no effect
' Scrollcats.Panel.Invalidate : this has no effect
For i=0 To nnn
Dim pnlcat As Panel
Dim btncat As Button
pnlcat.Initialize("pnlcat")
Scrollcats.Panel.AddView(pnlcat,0,5dip+i*persPanelHeight, 300dip,persPanelHeight)
pnlcat.Tag=i
pnlcat.Color=Colors.Red
btncat.Initialize("btncat")
pnlcat.AddView(btncat,5dip, 5dip, 170dip, 40dip)
btncat.Tag=...
btncat.Text=...
next
Scrollcats.Panel.Height=(i+2)*persPanelHeight