Problems with event ScrollChanged

psdos

Active Member
Licensed User
Longtime User
Hi, I have a problem with ScrollChanged event, i have this code in my program for to see that value "Position" change when scrolling it and event not changed. Anyone know why?

B4X:
Sub ScrollView1_ScrollChanged(Position As Int)
   Label7.Text = Position
End Sub

Thanks.
 

psdos

Active Member
Licensed User
Longtime User
klaus, the problem is this line

B4X:
Activity.AddView(ScrollView2, 0, 920, 400, 360)

i have a ScrollView that show list from SQL elements database. If i desactive this line ScrollView_ScrollChanged event if is ok, but ScrollView dont show anything elements from SQL.

Thanks.

Here have a sample of ScrollView with Event and Label1 to show value Position of ScrollView
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
I repeat once again, it is impossible to help you if we don't have the full code, or at least a smaller project that shows the problem !
Posting just one line is not enough.
What is the device resolution ?
In your line you set the Top value to 920 ?
B4X:
Activity.AddView(ScrollView2, 0, 920, 400, 360)
Are you sure that the ScrollView is visible on the screen?

Best regards.
 
Upvote 0

psdos

Active Member
Licensed User
Longtime User
I added the project looks up to see if you can make it work, is identical to mine

920 is for Galaxy Note (1280x800) and yes is visible
 
Upvote 0
Top