Sub CreateItemCB (ci As CellIndex) As CheckBox
Dim cb As CheckBox
Dim ch As ChannelPTT
ch.Initialize
ch = Channels.Get(ci.Column-2)
cb.Initialize("cb")
cb.Tag = ci
cb.TooltipText = ch.name
Return cb
End Sub
' // create all the channels for this row
For x = 2 To tvAccounts.ColumnsCount-1
tvAccounts.SetColumnWidth(x,50)
' // for each cell we create a cell index and checkbox for each channel and store the key
Dim ci As CellIndex
Dim p As Pane
p.Initialize("")
ci.key = rs1.GetString("device_id")
ci.Column = x
ci.Row = rowIndex
p.AddNode(CreateItemCB(ci),0,0,-1,-1)
row(x) = p
Next
I still get the same result. Where I am adding the pane node using -1,-1 I also tried using 60,60 to see if there was a difference and there was not.
Did This, same result. There is only pane.SetLayoutAnimated.
B4X:
' // create all the channels for this row
For x = 2 To tv.ColumnsCount-1
tv.SetColumnWidth(x,50)
' // for each cell we create a cell index and checkbox for each channel and store the key
Dim ci As CellIndex
Dim p As Pane
p.Initialize("")
ci.key = rs1.GetString("device_id")
ci.Column = x
ci.Row = rowIndex
p.AddNode(CreateItemCB(ci),0,0,60,60)
p.SetLayoutAnimated(0,0,0,60,60)
row(x) = p
Next
When you run this double click the col header to resize the col and you will see the effect. However when you scroll down past the cb's that have disappeared and then scroll back up they will reappear.