M MroBurk Member Licensed User Jan 27, 2022 #1 Hi, I need help with this project that I found in the forum. I want to change the button's color when I scroll with my finger directly on the screen. I add a sub Button()_click that changes the Scroll position. Why does the code below show any value of ScrollPosition? There is another method to change the button's color if I scroll directly? B4X: Private Sub pnlScv_ScrollChanged(Position As Int) Log(Position) Log(pnlScv.ScrollPosition) End Sub Attachments HorScvPanel.zip HorScvPanel.zip 135.4 KB · Views: 401
Hi, I need help with this project that I found in the forum. I want to change the button's color when I scroll with my finger directly on the screen. I add a sub Button()_click that changes the Scroll position. Why does the code below show any value of ScrollPosition? There is another method to change the button's color if I scroll directly? B4X: Private Sub pnlScv_ScrollChanged(Position As Int) Log(Position) Log(pnlScv.ScrollPosition) End Sub
khwarizmi Active Member Licensed User Longtime User Jan 28, 2022 #2 You haven't written the event name when initializing the HorizontalScrollView: B4X: pnlScv.Initialize(Activity.Width,"pnlScv") Upvote 0
You haven't written the event name when initializing the HorizontalScrollView: B4X: pnlScv.Initialize(Activity.Width,"pnlScv")