Hi all, I have a table of 10 columns and its cells are filled by imageviews.
I'd like to improve the row construction in order to have less or more columns dinamically.
So if I change the size of the form the number of columns changes too.
Is that possible?
Thank you
I'd like to improve the row construction in order to have less or more columns dinamically.
So if I change the size of the form the number of columns changes too.
Is that possible?
Thank you
B4X:
Sub AddPics
Dim iv(10) As ImageView
tbl_Settings
Dim row() As Object = CreateRow(Array As ImageView(iv(0),iv(1),iv(2),iv(3),iv(4),iv(5),iv(6),iv(7),iv(8),iv(9)))
tv1.Items.Add(row)
End Sub
B4X:
Sub CreateRow(Row() As Object) As Object()
Dim ivs(Row.Length) As Object
For i = 0 To Row.Length - 1
If i <= countpics-1 Then
Dim iv As ImageView
Dim images(10) As Image
iv.Initialize("")
iv.SetSize (80dip,80dip)
images(i).Initialize(mediapath,pics.Get(i))
iv.SetImage(images(i))
ivs(i) = iv
Else
Dim lbl As Label 'Add label in the case
lbl.Initialize("") 'pictures are less than
ivs(i) = lbl 'imageviews
End If
Next
Return ivs
End Sub