1) Well I want to add over the controls in a b4xpage/form new b4xview panels (seems ok)
B4X:
...
For k=0 To B4XTable1.Columns.Size-1
headerpanel.As(B4XView)=xui.CreatePanel("headerpanel")
headerpanel.Tag= "headerpanel" & k
headerpanel.SetColorAndBorder(xui.Color_Transparent,2,0,0)
Dim cc As B4XTableColumn=B4XTable1.Columns.Get(k)
leftest=leftest+cc.Width
Root.AddView(headerpanel,leftest,B4XTable1.mBase.Top+41,2,B4XTable1.mBase.Height-60) '+41 for label,search, -60 scrollbar height - can we get those somehow... ?
Next
...
2) And after a while, i want to remove only them... simple... ??? seems something wrong to me... i remove other b4xviews too... why ?????
B4X:
...
If headerpanel.IsInitialized And B4XTable1.IsInitialized Then
For Each v As B4XView In Root.GetAllViewsRecursive'not so right...
Dim t As String=v.Tag
If t.Contains("headerpanel") Then 'hmmm no ? but where are those.... ???
Log("hey")
v.As(Pane).RemoveNodeFromParent
End If
Next
End If
Sleep(0)
...
(You can see the video too..)
I am adding panels with color Transparent (making Green when move over the mouse)
- after somes secs... for example: searchfield... dissapearing !!! i wanted to remove only the panels added...
Your question has nothing to do with B4XView. B4XView is simply a cross platform API. It doesn't provide any special behavior.
B4X:
Dim ViewsThatShouldBeRemoved As List
ViewsThatShouldBeRemoved.Initialize
For k=0 To B4XTable1.Columns.Size-1
Dim headerpanel As B4XView =xui.CreatePanel("headerpanel")
ViewsThatShouldBeRemoved.Add(headerpanel)
Next
....
For Each v As B4XView In ViewsThatShouldBeRemoved
v.RemoveFromParent
Next
Your question has nothing to do with B4XView. B4XView is simply a cross platform API. It doesn't provide any special behavior.
B4X:
Dim ViewsThatShouldBeRemoved As List
ViewsThatShouldBeRemoved.Initialize
For k=0 To B4XTable1.Columns.Size-1
Dim headerpanel As B4XView =xui.CreatePanel("headerpanel")
ViewsThatShouldBeRemoved.Add(headerpanel)
Next
....
For Each v As B4XView In ViewsThatShouldBeRemoved
v.RemoveFromParent
Next
Your question has nothing to do with B4XView. B4XView is simply a cross platform API. It doesn't provide any special behavior.
B4X:
Dim ViewsThatShouldBeRemoved As List
ViewsThatShouldBeRemoved.Initialize
For k=0 To B4XTable1.Columns.Size-1
Dim headerpanel As B4XView =xui.CreatePanel("headerpanel")
ViewsThatShouldBeRemoved.Add(headerpanel)
Next
....
For Each v As B4XView In ViewsThatShouldBeRemoved
v.RemoveFromParent
Next