Page 1 of 1

Finding dimensions of dynamic list

Posted: 28 May 2015, 13:22
by spikylaura
Hello,

I have a dynamic list of text items (sometimes 5 items, sometimes 45) that I want to scroll from bottom to top of the screen. Is there a way to find the dimensions of its' bounding box. I need to know when the list has gone off the top of the screen to trigger the next event.

Any suggestions or workarounds would be gratefully received!

Many thanks,

Paul

Re: Finding dimensions of dynamic list

Posted: 28 May 2015, 14:55
by dondi
Hey Paul,

Not sure if your text items are separate text boxes or a single text box. If they are contained within a single text box, set the bounding box to Dynamic. You can then use the output height to calculate speed and plug a mover into it and then fire off the next event when it scrolls off screen, etc. I've done this with my music player project for Album Reviews where the length of the review text can be anywhere from one line to couple of paragraphs; I use the length to vary the scroll speed based on the height of the text box.

If you are using multiple text items, you can set the height outputs of each text box into a MultiSwitch node and use the sum parameter to sum-up all the heights and then use that for scroll distance/speed, etc. Hope that helps. There are probably other ways to do this, but I have used the 2 examples above successfully.

Good Luck,
-- Dondi