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?
 

Brian Dean

Well-Known Member
Licensed User
Longtime User
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

Scantech

Well-Known Member
Licensed User
Longtime User
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

Brian Dean

Well-Known Member
Licensed User
Longtime User
The view B4XSeekBar1 inside PreoptimizedCLV did work for you?
You are right - I simply looked at the seekbar. But I still think posting a demo project would be a good idea.
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
Did you tried with
B4X:
Sub B4XSeekBar1_ValueChanged (Value As Int)
    Dim SB as B4XSeekBar = Sender
    Log(SB.Value)
End Sub
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
the event that is activated is "Public Sub PCLV1_HintRequested (Index As Int) As Object"
and within the PCLV
B4X:
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

TILogistic

Expert
Licensed User
Longtime User
sample:
1.gif
 
Upvote 0
Top