iOS Question Handel B4XSeekBar and ScrollView

mehdipass

Active Member
Hi,
When I add B4XSeekBar in ScrollView, when change value of B4XSeekBar, Scroll up and down also change (because B4XSeekBar in ScrollView)
How to handel it?
In b4a, I use this code to handel B4XSeekBar in ScrollView:
Code:
Private Sub b4xseek_TouchStateChanged (Pressed As Boolean)
    #if B4A
        Dim v As B4XSeekBar = Sender
        Dim jo As JavaObject = v.mBase.Parent
        jo.RunMethod("requestDisallowInterceptTouchEvent", Array(Pressed))
    #End If
End Sub

How to handel in b4i?
 
Solution
Hi,
I solved it.
Use this code:

code:
Private Sub b4xseek_TouchStateChanged (Pressed As Boolean)
    #if B4A
        Dim v As B4XSeekBar = Sender
        Dim jo As JavaObject = v.mBase.Parent
        jo.RunMethod("requestDisallowInterceptTouchEvent", Array(Pressed))
    #End If
    #if B4I
    ScrollView1.ScrollEnabled = Not(Pressed)
    #End If
End Sub

It works well.

mehdipass

Active Member
Hi,
I solved it.
Use this code:

code:
Private Sub b4xseek_TouchStateChanged (Pressed As Boolean)
    #if B4A
        Dim v As B4XSeekBar = Sender
        Dim jo As JavaObject = v.mBase.Parent
        jo.RunMethod("requestDisallowInterceptTouchEvent", Array(Pressed))
    #End If
    #if B4I
    ScrollView1.ScrollEnabled = Not(Pressed)
    #End If
End Sub

It works well.
 
Upvote 0
Solution
Top