ScrollView _ScrollChanged Event Not Triggering...

sconcequence

Member
Licensed User
Longtime User
I have programmatically created a Scrollvew object called Scrollview1 in Sub Globals (Dim ScrollView1 As ScrollView). It is later initialized and a layout is loaded into it. I created an additional Sub called ScrollView1_ScrollChanged(Position As Int) at the very bottom. When I set a breakpoint in this function and load the debugger, the function never gets called when I use my finger to scroll the scrollview on my Android device.

What am I doing wrong? Thanks.

--
 

Sanxion

Active Member
Licensed User
Longtime User
Hi

I have a similar problem. I have declared my EditText box (etSearch):

Sub Globals

Dim etSearch As EditText

Then I intialized it:

Sub Activity_Create(FirstTime As Boolean)

etSearch.Initialize(etSearch)
Activity.AddView(etSearch,0,0,100%x,40dip)

However my event is never fired:

Sub etSearch_TextChanged (Old As String, New As String)

Msgbox("Hello","")

What am I doing wrong?

Thanks.
 
Upvote 0

Sanxion

Active Member
Licensed User
Longtime User
Thanks hbruno - it worked!

(Although I am surprised that it did not error with the absence of the "")

:sign0142:
 
Upvote 0

jnjft

Member
Licensed User
Longtime User
@ sconcequence: Try initializing the ScrollView with Initialize2 instead of Initialize - this way you can set an eventname:

Dim ScrollView1 as ScrollView
ScrollView1.Initialize2(1000dip, "ScrollView1")

Then the ScrollChanged-Event is triggered in
Sub ScrollView1_ScrollChanged(Position as Int)

Regards
John
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…