Mashiane Expert Licensed User Longtime User Jul 16, 2016 #1 Hi Your example, https://www.b4x.com/android/forum/threads/paging-indicator-for-scrollview.66094/#post-418575, bears reference. I'd like when the person is scrolling from left to right to return the page number they have selected. How can I achieve that please? I intend to have about 6 slides on the scrollview and would like to execute code depending on each page being shown from 0 to 5. Please advise and thanks..
Hi Your example, https://www.b4x.com/android/forum/threads/paging-indicator-for-scrollview.66094/#post-418575, bears reference. I'd like when the person is scrolling from left to right to return the page number they have selected. How can I achieve that please? I intend to have about 6 slides on the scrollview and would like to execute code depending on each page being shown from 0 to 5. Please advise and thanks..
Erel B4X founder Staff member Licensed User Longtime User Jul 17, 2016 #2 Not sure that I understand. Do you want to skip over some of the pages? Upvote 0
Mashiane Expert Licensed User Longtime User Jul 17, 2016 #3 Erel said: Not sure that I understand. Do you want to skip over some of the pages? Click to expand... It's ok, I found it.. Code: Copy Sub ScrollView1_ScrollChanged (OffsetX As Int, OffsetY As Int) For Each p As Panel In panels If p.Left = OffsetX Then noPageControl.SetField("currentPage", p.Tag) Log(p.Tag) End If Next End Sub I wanted to return the page, Log(p.Tag) here does it. Perfect! Upvote 0
Erel said: Not sure that I understand. Do you want to skip over some of the pages? Click to expand... It's ok, I found it.. Code: Copy Sub ScrollView1_ScrollChanged (OffsetX As Int, OffsetY As Int) For Each p As Panel In panels If p.Left = OffsetX Then noPageControl.SetField("currentPage", p.Tag) Log(p.Tag) End If Next End Sub I wanted to return the page, Log(p.Tag) here does it. Perfect!