Sub Create_grid(p As Panel, r As Int, c As Int)
Dim days() As Int = Array As Int(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31)
Dim months() As String = Array As String("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec")
Dim years() As Int = Array As Int( DateTime.GetYear(DateTime.Now), DateTime.GetYear(DateTime.Now) + 1, DateTime.GetYear(DateTime.Now) + 2)
' Dim filler As List = Array As List (days,months,years) 'either lists or direct data make no diff
Dim s As Spinner
For row = 0 To r-1
For col = 0 To c - 1
s.Initialize("s")
p.AddView(s, p.Width / 3 * col, 0, p.Width / 3, 100)
' s.AddAll(filler.get(col)) 'it yacks here
If col = 0 Then s.AddAll(days)
If col = 1 Then s.addall(months)
If col = 2 Then s.AddAll(years)
'how to set primary selection to current date
Next
Next
' s.initialize("s")
' p.AddView(s, 0, 0, p.Width / 3, p.Width / 3)
' s.AddAll(days)
' s.selectedindex = DateTime.GetDayOfMonth(DateTime.now)
'
' s.initialize("s")
' p.AddView(s, p.Width / 3, 0, p.Width / 3, p.Width / 3)
' s.AddAll(months)
' s.SelectedIndex = DateTime.GetMonth(DateTime.Now)
'
' s.Initialize("s")
' p.AddView(s, (p.Width / 3)* 2, 0, p.Width / 3, p.Width / 3)
' s.AddAll(years)
' s.SelectedIndex = DateTime.GetDayOfYear(DateTime.Now)
'
End Sub