How do I update a scroller with variable text?

This is the place to discuss anything relating to MobGUI

Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21

Post Reply
williamdesmet
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 66
Joined: Tue Jun 26, 2012 7:07 pm

How do I update a scroller with variable text?

Post by williamdesmet » Wed Feb 12, 2014 8:15 pm

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

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

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

Post by splash21 » Wed Feb 12, 2014 9:29 pm

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 338 times
LiveCode Development & Training : http://splash21.com

williamdesmet
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 66
Joined: Tue Jun 26, 2012 7:07 pm

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

Post by williamdesmet » Thu Feb 13, 2014 7:13 pm

Hi John,

Your sample stack made my day.
Thank you!

Greetings,

William

Post Reply

Return to “MobGUI”