Sub DefineScrollColls()
' Position x and width
Dim x(5), w(5) As Int
x = Array As Int(0, 10%x, 20%x, 70%x, 85%x)
w = Array As Int(10%x, 10%x, 50%x, 15%x, 15%x)
' Title of columns
Dim t(5) As String
t = Array As String("Tr", "Dup", "List", "Date", "Num")
' Color of title (radius for testing)
Dim bckColorTitle As ColorDrawable
bckColorTitle.Initialize(0xFF3A5FCD, 50)
' Color of lines
Dim bckColorEven As ColorDrawable
bckColorEven.Initialize(0xFFCCCCCC, 50)
' Store the caracteristics of columns
If Not(Main.ObjectSize.IsInitialized) Then
Main.ObjectSize.Initialize
End If
If Not(Main.ObjectSize.ContainsKey("scroll.col0.X")) Then
For i = 0 To x.Length - 1
Main.ObjectSize.Put($"scroll.col${i}.X"$, x(i))
Main.ObjectSize.Put($"scroll.col${i}.Width"$, w(i))
Main.ObjectSize.Put($"scroll.col${i}.Title"$, t(i))
Main.ObjectSize.Put($"scroll.col${i}.Gravity"$, Gravity.CENTER)
Main.ObjectSize.Put($"scroll.col${i}.TitleBackground"$, bckColorTitle)
Main.ObjectSize.Put($"scroll.col${i}.Background"$, bckColorEven)
Next
End If
End Sub