Hi guys - yes I have checked out other responses to this one but I still can't find it. The header panel appears at the top of the scroll view but nothing get added to it because it throws the error...
Sub SetHeader(Values() As String)
scvLibrary.Initialize(1000dip)
'Set the headers values
If pnlHeader.IsInitialized Then 'should only be called once
Return
End If
pnlHeader.Initialize("")
pnlHeader.Color = HeaderLineColor
For i = 0 To NumberOfColumns - 1
Dim l As Label
l.Initialize("Header")
If SortDirection(i) = "ASC" Then
l.Text = Values(i) & " ↓"
Else
l.Text = Values(i) & " ↑"
End If
l.Text = Values(i)
l.Gravity = Gravity.CENTER
l.TextSize = FontSize
l.Color = HeaderColor
l.TextColor = HeaderFontColor
l.Tag = i
pnlHeader.AddView(l, TotalColumnWidth(i), 0, ColumnWidth_1(i), RowHeight_1)
Next
Activity.AddView(pnlHeader, scvLibrary.Left, 0, scvLibrary.Width, RowHeight)
End Sub
I know it is something simple but I just don't see it - can you please?
Sub SetHeader(Values() As String)
scvLibrary.Initialize(1000dip)
'Set the headers values
If pnlHeader.IsInitialized Then 'should only be called once
Return
End If
pnlHeader.Initialize("")
pnlHeader.Color = HeaderLineColor
For i = 0 To NumberOfColumns - 1
Dim l As Label
l.Initialize("Header")
If SortDirection(i) = "ASC" Then
l.Text = Values(i) & " ↓"
Else
l.Text = Values(i) & " ↑"
End If
l.Text = Values(i)
l.Gravity = Gravity.CENTER
l.TextSize = FontSize
l.Color = HeaderColor
l.TextColor = HeaderFontColor
l.Tag = i
pnlHeader.AddView(l, TotalColumnWidth(i), 0, ColumnWidth_1(i), RowHeight_1)
Next
Activity.AddView(pnlHeader, scvLibrary.Left, 0, scvLibrary.Width, RowHeight)
End Sub
I know it is something simple but I just don't see it - can you please?