Page 1 of 1

Scroller demo with dynamic resizing text field

Posted: Sat Jul 09, 2011 2:07 pm
by splash21
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 485 times

Hope this is useful.


John.

Re: Scroller demo with dynamic resizing text field

Posted: Thu Sep 08, 2011 3:12 pm
by DRJ-UK
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

Re: Scroller demo with dynamic resizing text field

Posted: Fri Sep 30, 2011 2:07 am
by JosepM
Thanks John !

Salut,
Josep