Sub CreateListItem(Text As String, Width As Int, Height As Int) As Panel
Dim p As Panel
p.Initialize("")
p.SetLayout(0, 0, Width, Height)
p.LoadLayout("cellitem")
label1.Text = " Name "
labelnumber.Text = "100 "
Return p
End Sub
i am trying to set some items visible to False how can i do that programmatically based on items index ?
It's not so easy; I have to do other things now, but the way is to create a HideItem routine, based on RemoveAt (copying RemoveAt and modifiyng its code)
This the "most quick way", of course (you have to store the item and its index, in a "List of type tXXXItem).
A better solution would be to add a method like SetItemVisibility(Visible As Boolean).
The tag property is already used; maybe we can create an internal type, to store the Index and Visible.
Then the ItemVisibility routine should be very similar to RemovaAt.