Re: Make text scroll up with ScrollableTextlayout?

38 views
Skip to first unread message

Nathan

unread,
Sep 23, 2012, 9:27:24 PM9/23/12
to pyglet...@googlegroups.com
On Sun, Sep 23, 2012 at 2:36 PM, Zack <cki...@gmail.com> wrote:
Hey there, I posted this on Stackoverflow as well, but noticed that the activity in the pyglet section there is pretty low, so I figured it would be better to post it here. 


Basically, my question is how do I make text scroll upwards rather than downwards in a ScrollableTextLayout? I thought the property I needed to set was .view_y, but I've tried many different positive and negative values, but received no change in behavior. So, I'm not sure if (a) that's even what that property is for, or (b), it is, and I'm just using it incorrectly. 

Thanks for the help! 

You're welcome. :-)

I gave a nice, long, nicely formatted answer on StackOverflow.

The short version is to add the following line to your update() method:

self.layout.view_y = -self.layout.content_height

~ Nathan 

Reply all
Reply to author
Forward
0 new messages