Hi all.
I have a problem. I'm using B4xTabStrip with 3 pages. Each page contains a label, a textfield and customlistview. Each CLV contains B4xSwithes a labels.
Actually it's a schedule for a provider for each day of week. Provider clicks on a day of week in tab strip, selects Yes / No for each shift he wants to work and so on.
Then I need to loop trough each day of week (page of tab strip) collect provider's selections and send it back to the database.
I can populate with a data and it looks Ok. The problem is that I can't find a CLV on tab strop page. I see that I have 3 views as expected, I see a label and text field but not a CLV.
Here is a code I'm using
I expected that line pg.RootPanel.GetView(2) will return me CLV but it returns a Panel (see the image)
Please see the attached project.
Thanks.
I have a problem. I'm using B4xTabStrip with 3 pages. Each page contains a label, a textfield and customlistview. Each CLV contains B4xSwithes a labels.
Actually it's a schedule for a provider for each day of week. Provider clicks on a day of week in tab strip, selects Yes / No for each shift he wants to work and so on.
Then I need to loop trough each day of week (page of tab strip) collect provider's selections and send it back to the database.
I can populate with a data and it looks Ok. The problem is that I can't find a CLV on tab strop page. I see that I have 3 views as expected, I see a label and text field but not a CLV.
Here is a code I'm using
B4X:
Sub Button1_Click
Try
Dim pg As Page
Dim n As Int
Dim lbl As Label
Dim pan As Panel
For i=0 To 2
pg.Initialize("")
pg=TabPages.Get(i)
pan.Initialize("")
n=pg.RootPanel.NumberOfViews
Log("Title=" & pg.title & " n=" & n)
txtTest=pg.RootPanel.GetView(0)
Log("Text=" & txtTest.Text)
lbl=pg.RootPanel.GetView(1)
Log("Lbl=" & lbl.Text)
'Here is when the problem happens
'How to get a CLV to pass it into GetAnswers sub?
pan=pg.RootPanel.GetView(2)
cvTab1=pan.GetView(0)
GetAnswers(cvTab1)
Next
Catch
Log(LastException)
End Try
End Sub
I expected that line pg.RootPanel.GetView(2) will return me CLV but it returns a Panel (see the image)
Please see the attached project.
Thanks.
Attachments
Last edited: