Hi,
How can I set the same scroll position for BBCodeView1, in case I scroll manually BBCodeView2 marked
in the photo number two? I temporarily get this through the Timer:
Sub Timer_Tick
BBCodeView1.sv.ScrollViewOffsetY = BBCodeView2.sv.ScrollViewOffsetY
End Sub
Project - B4J (in standard class HTMLEditorWrapper):
'Transfer the vertical scroll position from BBCodeView1
Sub BBCodeView1_VScrollView(V As Double)
If BBCodeView2.sv.ScrollViewOffsetY <> V Then
BBCodeView2.sv.ScrollViewOffsetY = V
End If
End Sub
'Transfer the vertical scroll position from BBCodeView2
Sub BBCodeView2_VScrollView(V As Double)
If BBCodeView1.sv.ScrollViewOffsetY <> V Then
BBCodeView1.sv.ScrollViewOffsetY = V
End If
End Sub
BCTextEngine LIB V1.92 - B4J (in standard class BBCodeView)
Added :
Project - B4J (in standard class HTMLEditorWrapper):
'Transfer the vertical scroll position from BBCodeView1
Sub BBCodeView1_VScrollView(V As Double)
If BBCodeView2.sv.ScrollViewOffsetY <> V Then
BBCodeView2.sv.ScrollViewOffsetY = V
End If
End Sub
'Transfer the vertical scroll position from BBCodeView2
Sub BBCodeView2_VScrollView(V As Double)
If BBCodeView1.sv.ScrollViewOffsetY <> V Then
BBCodeView1.sv.ScrollViewOffsetY = V
End If
End Sub
BCTextEngine LIB V1.92 - B4J (in standard class BBCodeView)
Added :
BCTextEngine LIB V1.92 - B4J (in standard class BBCodeView):
#if B4J
Private Sub sv_VScrollChanged (Position As Double)
If LazyLoading Then DrawVisibleRegion
If xui.SubExists(mCallBack, mEventName & "_VScrollView", 1) Then
CallSubDelayed2(mCallBack, mEventName & "_VScrollView", sv.ScrollViewOffsetY) 'Transfer the vertical scroll position
End If
End Sub
Now scrolling BBCodeView1 its counterpart BBCodeView2 scrolls automatically. I think that this is a bit better way than using Timer.