Scrolling text w/o scroll bars in iOS

Randy Hengst iowahengst at mac.com
Mon Mar 7 22:02:26 EST 2011


Steve and Jacque,


Steve I did it using the script below in the text field… no scroll bar shows….

but, Jacque, I'd love to see a specific example of scrolling one text field with the iOS scroller showing. I really haven't been able to organize the overlay deal.

local tScollField
local tStartY

on mouseDown
   put item 2 the clickLoc into tStartY
   put tStartY
   put "yes" into tScollField
end mouseDown

on mouseMove x,y
   if tScollField = "yes" then
      set the vscroll of target to (the vScroll of target) - (y-tStartY)
   end if
end mouseMove

on mouseUp
   put "no" into tScollField
end mouseUp

on mouseRelease
   mouseUp
end mouseRelease



take care,
randy hengst
-----
On Mar 7, 2011, at 7:47 PM, J. Landman Gay wrote:

> On 3/7/11 2:50 PM, Steve Jones wrote:
>> This doesn't seem to work for me - either in the iPhone simulator or
>> downloaded to my iPhone.  It does work in the internal "test:\" mode
>> to LiveCode though.  So not sure what's up there.
> 
> Do you mean you don't want any kind of scroller at all, or do you want a field with an iOS scroller but no native field scrollbars? In other words, do you need to emulate the iOS look and feel?
> 
> For no scrollbar/scroller at all, try using Colin's script but with the touch events instead of the mouse events. I'm not sure mouseStillDown is the best way to scroll, but start with that. Ideally you'd use a "send" structure.
> 
> If you want a native iOS scroller, that's different, it's overlaid on top of the field. You catch the messages it sends and respond to them by changing the field's vScroll property.
> 
> If you can give a little more info about what you need, we can help.
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list