Hi,
i try to use ASViewPager to show the content of database records.
It looks very good, but i have the problem to access the actual shown record. I want to edit the record which is visible.
In my testversion i use following code:
Everything works fine and all records are shown. I can scroll left and right.
But when i try to edit a field in >pnl_for_daten< i always edit the LAST panel i added.
I tried using .CurrentIndex2 to jump to the item and edit a field. No success.
My problem is that i always use the same layout for every page. And ... the item names are the same in every page.
I don't see a way to address the >actual shown< page.
I think there is a way to do this, but i don't know how.
Thanks in advance
Fred
i try to use ASViewPager to show the content of database records.
It looks very good, but i have the problem to access the actual shown record. I want to edit the record which is visible.
In my testversion i use following code:
B4X:
Class_Globals
Private ASVP1 As ASViewPager
Private pnl_for_daten As B4XView
End Sub
Sub SatzEinlesen
For i = 1 To 5
pnl_for_daten= xui.CreatePanel("")
pnl_for_daten.SetLayoutAnimated(0,0,0,ASVP1.Base.Width, ASVP1.Base.Height)
pnl_for_daten.LoadLayout("ly_vorgang_daten")
'Daten einlesen ---
ASVP1.AddPage(pnl_for_daten, i)
Next
End Sub
Everything works fine and all records are shown. I can scroll left and right.
But when i try to edit a field in >pnl_for_daten< i always edit the LAST panel i added.
I tried using .CurrentIndex2 to jump to the item and edit a field. No success.
My problem is that i always use the same layout for every page. And ... the item names are the same in every page.
I don't see a way to address the >actual shown< page.
I think there is a way to do this, but i don't know how.
Thanks in advance
Fred