Android Question PCLV Seekbar value change usage

Scantech

Well-Known Member
Licensed User
Longtime User
Is it possible to use the PCLV.B4XSeekBar1_ValueChanged?

B4X:
Sub B4XSeekBar1_ValueChanged (Value As Int)
    Log(Value)
End Sub
That did not work

B4X:
    Dim SB As B4XSeekBar
    SB.Initialize(Me, "SB")
    SB = PCLV.B4XSeekBar1
   
Sub SB_ValueChanged (Value As Int)
    Log(Value)
End Sub
That also did not work

any idea?
 
Is it possible to use the PCLV.B4XSeekBar1_ValueChanged?
Yes, of course.
Sub B4XSeekBar1_ValueChanged (Value As Int)
Log(Value)
End Sub
That did not work
It worked for me. I expect you have something wrong elsewhere. If you have not fixed it for yourself by now then post a complete sample project and maybe someone can point out what you have missed.
 
Upvote 0
Yes, of course.


It worked for me. I expect you have something wrong elsewhere. If you have not fixed it for yourself by now then post a complete sample project and maybe someone can point out what you have missed.
The view B4XSeekBar1 inside PreoptimizedCLV did work for you? Standalone B4Xseekbar1 have no problem with me. Ill post the sample project later. Thanks
 
Upvote 0
Did you tried with
B4X:
Sub B4XSeekBar1_ValueChanged (Value As Int)
    Dim SB as B4XSeekBar = Sender
    Log(SB.Value)
End Sub
 
Upvote 0
the event that is activated is "Public Sub PCLV1_HintRequested (Index As Int) As Object"
and within the PCLV
Code:
Sub B4XSeekBar1_ValueChanged (Value As Int)
    LastUserChangeIndex = Max(0, items.Size - 1 - Value)
    If LastUserChangeIndex < B4XSeekBar1.Interval Then LastUserChangeIndex = 0
    lblHint.Text = ""
    If xui.SubExists(mCallback, mEventName & "_HintRequested", 1) Then
        Dim t As Object = CallSub2(mCallback, mEventName & "_HintRequested", LastUserChangeIndex)
        If t <> Null Then
            InternalSetTextOrCSBuilderToLabel(lblHint, t)
        End If
    End If
End Sub
 
Upvote 0
sample:
1.gif
 
Upvote 0
Back
Top