Stop group scrolling for data entry

Moderators: LCNeil, heatherlaine, kevinmiller, elanorb

Post Reply
newtronsols
Posts: 192
Joined: Tue Mar 11, 2014 12:57 pm

Stop group scrolling for data entry

Post by newtronsols » Fri Aug 22, 2014 8:02 am

I am trying to stop a group scrolling for data entry.

I have been experimenting setting
mobileControlSet "Scroller", "scrollingEnabled", false when the long id of the data entry field is the focusedobject without success. Any ideas how to get this to work for all data entry fields and where this should be - e.g. onscrollerdidscroll... or in code for the field itself or card level etc...

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Stop group scrolling for data entry

Post by LCNeil » Fri Aug 22, 2014 10:50 am

Hi Newtronsols,

Applying the following script to a button then setting the behaviour of any fields within a scroll group too this button works if you wish to disable scrolling on field focus. When the field looses focus, the scrolling is re-enabled.

Code: Select all

on openField
   if the environment is "mobile" then
      mobileControlSet "loremScroll", "scrollingEnabled", false
   end if
end openField

on closeField

   if the environment is "mobile" then
      mobileControlSet "loremScroll", "scrollingEnabled", true
   end if
end closeField

on exitField

   if the environment is "mobile" then
      mobileControlSet "loremScroll", "scrollingEnabled", true
   end if
end exitField

Please see the attached stack as an example.

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
Attachments
Scroller Example field stops scroll.zip
(2.55 KiB) Downloaded 52 times

newtronsols
Posts: 192
Joined: Tue Mar 11, 2014 12:57 pm

Re: Stop group scrolling for data entry

Post by newtronsols » Fri Aug 22, 2014 1:07 pm

Excellent. I would never have figured it out in such a neat way. Thanks.

Post Reply

Return to “idea2app and Coding School”