Scrolling field jump when selected

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Scrolling field jump when selected

Post by seaniepie » Fri May 11, 2012 4:33 pm

Hi,

Is there any way to stop a scrolling field from automatically jumping to text that has been selected/highlighted? I am using a script to highlight an item in a list and then want to use an animation script to smoothly scroll it to the location. But what happens is that it jumps to the highlighted text, jumps back to it's original position then scrolls to the highlighted text. I know I could put a lock screen before and after the jump but sometimes it happens while the emulated wheel (in iOS) is still scrolling and would still cause a jump.

So, how do we turn off the 'scroll to highlighted' function (as I call it)?

Thanks
Pi

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Scrolling field jump when selected

Post by Mark » Sat May 12, 2012 11:56 am

Hi,

This should work:

Code: Select all

lock screen
put the scroll of fld x into myScroll
set the hilitedLine of fld x to y
set the scroll of fld x to myScroll
unlock screen
-- your animation here
Perhaps you could make sure that the emulated wheel isn't scrolling anymore, before you select the line? Do you have any references to that emulated wheel?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply