Maximum field height?
J. Landman Gay
jacque at hyperactivesw.com
Sun Apr 5 14:52:52 EDT 2020
On 4/5/20 1:12 PM, Richard Gaskin via use-livecode wrote:
> Once I saw that the scroller works well on the field content I've been working with, I added a
> routine to my mobile lib that automatically removes the vScrollbar from any non-editable field
> that has one, and instantiates a matching scroller over it.
That's my standard procedure too, unless I'm using a pseudo-scrolling handler that allows
pushing up or down on the field on desktop. It's basically a simulation, but for quick access
during development it's faster to just use the built-in scrollbar.
> So yes, I'm using the field directly with no enclosing group, but no, I don't use the desktop
> scrollbar on mobile; the scroller overlay does a good job of tracking the user interaction,
> with the appropriate endpoint indication and all, and scrolling the field in response to the
> scroller's messages has worked well.
I just released an app using this method and on iOS the stutter is quite noticeable, as well as
on Android devices with slower CPUs. It's okay for short text, sort of (though there's a brief
jerk) but for anything longer it fails. Up until LC 9 it was possible to set the field to use a
scrolling layermode in the property inspector, but that's been removed. You can still set it by
script, but it has no effect (and probably never did) and the engine defaults to dynamic
> While you're at it, it may be worthwhile turning the scrollbar of the field off and having your
> scrollerDidScroll set the scroll of the field directly, with no enclosing group at all.
As above, that's what my previous app did. I'm going to change that for the next update, as it
> If it works as well for you as it's been doing for me, it saves me another test <g> and gives
> confidence to others that actually development with LiveCode isn't nearly as cumbersome as that
> Lesson on scrolling fields suggests.
Well, basically the lesson is correct. I wish it weren't so. But if you only use a few fields
with short content, your easier method is probably passable. My previous app has a field whose
content is almost always less than the field height, but only extends beyond that for a few
lines occasionally. For something like that, I'd probably skip the group. If you feel like
experimenting, try a field sized to a mobile screenrect with 50+ lines of wrapped text. Do it
on iOS if you have one of those phones; the simulator won't give you the same response.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode