Scrollview problem on ScrollPosition

Rioven

Active Member
Licensed User
Longtime User
Hello,
I have used the command ScrollView1.ScrollPosition which works on emulator but not on my motorola atrix with Android version 2.2.2. What do you think I have missed?
 

Rioven

Active Member
Licensed User
Longtime User
the code

Erel, no error and and not getting updated when scrolled.

kickaha, below is the partial sample code. I am still new and learning, please have a look.
Is it not the problem on consistencies in variables types used?



Sub tb1_FocusChanged (HasFocus As Boolean)
If HasFocus Then
Dim send As EditText
Send = Sender
FocusLocation=Send.Tag
Else
'....
End If
End Sub


Sub InsBtn_Click 'Insert

pnlheight=50dip

If FocusLocation<>-1 Then
Input1list.InsertAt(FocusLocation,"")
Input2list.InsertAt(FocusLocation,"")

editFlag1=True
editFlag2=True
LoadTable
editFlag2=False

ScrollView1.ScrollPosition = FocusLocation* pnlheight

End If
End Sub
 
Upvote 0

Rioven

Active Member
Licensed User
Longtime User
DoEvents

Hi Klaus,

The DoEvents before the ScrollView1.ScrollPosition works fantastic! but don't know why on emulator works without DoEvents....:confused:
Thanks!
 
Upvote 0

eps

Expert
Licensed User
Longtime User
Well this is odd.. I am setting ScrollView.Scrollposition and it works intermittently in an AVD.. It seems that if I trace the code, the scrollposition works, but if I don't trace it then it doesn't... I'll put DoEvents in and see if this makes a difference.
 
Upvote 0
Top