Good evening together,
I got the following problem:
i create a ScrollView and add Checkboxes to it like this:
Private Check as Checkbox
Check.Initialize("Check")
Activity.AddView(Check,10%x,10%y,25%x,15%y)
Check.RemoveView
Check.Tag = i 'i is an ongoing number with +1 for each view, starts at i=0
ScrollView1.Panel.AddView(Check,50%x,TOP-12dip,100%x,10%y)
The problem is that I dont get the tag ("i") of my Checkbox by checking it in the app. I use this code:
Sub Check_CheckedChange
Check = Sender
Msgbox(Check.tag, "Test")
End Sub
It always returns the last i (highest tag-number) which was added to the ScrollView.Panel.
What can I do? I tried every thinkable variantions like:
Msgbox(ScrollView1.Panel.GetView(Check.Tag).Tag,"Test")
or others. The problem is that I dont get the Sender, but why. For Label-Views same seems to work.
Thanks for your help!
I got the following problem:
i create a ScrollView and add Checkboxes to it like this:
Private Check as Checkbox
Check.Initialize("Check")
Activity.AddView(Check,10%x,10%y,25%x,15%y)
Check.RemoveView
Check.Tag = i 'i is an ongoing number with +1 for each view, starts at i=0
ScrollView1.Panel.AddView(Check,50%x,TOP-12dip,100%x,10%y)
The problem is that I dont get the tag ("i") of my Checkbox by checking it in the app. I use this code:
Sub Check_CheckedChange
Check = Sender
Msgbox(Check.tag, "Test")
End Sub
It always returns the last i (highest tag-number) which was added to the ScrollView.Panel.
What can I do? I tried every thinkable variantions like:
Msgbox(ScrollView1.Panel.GetView(Check.Tag).Tag,"Test")
or others. The problem is that I dont get the Sender, but why. For Label-Views same seems to work.
Thanks for your help!