Page 1 of 1

How do I update a scroller with variable text?

Posted: Wed Feb 12, 2014 8:15 pm
by williamdesmet
Hi John,

I am kinda stuck here :-(
I am trying to use a scroller and update the closed in field with variable text.
By script I want to add or delete lines of text but the height of the scroller is not updated.
Can you give a clue on how to do this?

P.S. I did this before with just plain code in another stack and got it to work just fine.

greetings,

William

Re: How do I update a scroller with variable text?

Posted: Wed Feb 12, 2014 9:29 pm
by splash21
Hi, William. Here's an example stack. The text field inside the scroller has 2 custom properties (text1 and text2) with text samples of different lengths. The 2 buttons change the field contents to the different text samples and optionally reset the scroller back to the top. Take a look at the script of the buttons for more details. Hopefully this will help get you moving again - let me know if anything doesn't work the way you expect or if you need any more info :)

(I included a "Fonts" folder in 'Standalone Settings => Copy Files' with the mobguicons fonts for the check box)
ScrollerExample.png
ChangingScrollerExample.zip
(13.35 KiB) Downloaded 342 times

Re: How do I update a scroller with variable text?

Posted: Thu Feb 13, 2014 7:13 pm
by williamdesmet
Hi John,

Your sample stack made my day.
Thank you!

Greetings,

William