How to reset every pages ' scrollview is initialize(0)

Theera

Expert
Licensed User
Longtime User
Hi Klaus,
I must request you again.It's old widget that adjusted with addition many commands. I'm still not understand to add this command
dim sv as scrollview
sv.initialize(0)

for every pages after I pressed the summaryOK button

Best Regards
Theera
 
Last edited:

Theera

Expert
Licensed User
Longtime User
What exactly don't you understand ?

Best regards.

Hi Klaus,
I created about summary for purchase. The user can purchase more porducts from many tabs(i.e. user can purchase PVC group and then purchase another tab Electric light group).After user pressed the summaryOK button ,it should display sv.initialize(0) for every tabs.
My problem is How to paste this code
dim sv as scrollview
sv.initialize(0)
for every tabs after user pressed the summaryOK button?
P.S. Picture which displayed after pressed the summaryOK button,the scrollview is not to be sv.initialize(0) for every tabs.
Best Regards
Theera
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
I suppose you mean the scv.ScrollPosition and not scv.Initialize(0).
If yes you can modify the btnSummaryOK_Click routine like below:
B4X:
Sub btnSummaryOK_click
    Dim i As Int
    
    AccuTxtAnswers=""
    lblSummary.Text=""    
    pnlGrandTotal.Visible=False
    btnAddPurchase_click
    
    For i = 0 To gPageNumber - 1
        Dim pnl As Panel
        pnl = container.GetPageObject(i)
        Dim scv As ScrollView
        scv = pnl.GetView(0)
        scv.ScrollPosition = 0
    Next
End Sub
Best regards.
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
Thank you,Klaus
I think it's completely
 
Upvote 0
Top