Scroller demo with dynamic resizing text field

This is the place to discuss anything relating to MobGUI

Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21

Post Reply
splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Location: UK
Contact:

Scroller demo with dynamic resizing text field

Post by splash21 » Sat Jul 09, 2011 2:07 pm

I've had quite a few requests for a scroller demo that dynamically resizes. The attached stack shows a text field inside a scroller with changing content. Note: if the text field ends up smaller than the scroller, then no scrolling/bouncing takes place - if you want to always have the bounce effect even with very little content, just ensure the height of the text field never gets smaller than the height of the scroller. Content within the scroller is repositioned by code as it changes size. This is because contents of the scroller could be anything that you decide to put in there - it doesn't just have to be a text field!

ScrollerTextDemo.zip
(117.74 KiB) Downloaded 482 times

Hope this is useful.


John.
LiveCode Development & Training : http://splash21.com

DRJ-UK
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 73
Joined: Tue Aug 23, 2011 2:50 pm
Location: United Kingdom
Contact:

Re: Scroller demo with dynamic resizing text field

Post by DRJ-UK » Thu Sep 08, 2011 3:12 pm

John

MobGUI is really useful and has many excellent features. :D Of all the features you include, the scroller has proved the more challenging to use at times, especially for dynamic content. However, this is a really useful demo and the coding makes a lot of sense when looking through.

Trying to get a scroller to resize properly was proving rather frustrating at times :? so discovering this post was most useful. It would be good to include reference to the key lines in the MobGUI documentation.

Look forward to hearing about future versions in due course.

Dave
LiveCode: Versions 8.0, 8.1
Xcode: Version 7.3, 8.0
Mac OS X: 10.11.12 (macOS Sierra) on iMacs with 3.4 Intel Core i7 & 16GB Memory

Creating Apps for educational professionals, effective teaching and learning.

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Scroller demo with dynamic resizing text field

Post by JosepM » Fri Sep 30, 2011 2:07 am

Thanks John !

Salut,
Josep

Post Reply

Return to “MobGUI”