I'm trying to create a "chat window" type of effect using a ScrollPane to contain the chat log. I've added an lgScn2DScrollPane to my stage which contains a group that contains a table. At runtime, I add rows containing a label to the table and then resize the group containing the table to accommodate the height of the new label.
This works fine, what is not working is when after adding the new line I issue a .ScrollTo(0, 0, width, height) it doesn't scroll. I've also tried .ScrollPercent = 100 which has the same effect. It acts as if the maximum scroll height is staying the same until after the render event. I even tried moving the ScrollTo to the render event just prior to the Stage.Draw from the "add line" routine and it makes no difference.
I can manually scroll to the bottom via the scrollbar or swipe to scroll but every time I add a new "line" to the display, the .ScrollTo method in code only scrolls down to the previously added line.
How can I have it scroll properly, or is there a more suitable way of creating a "chat text" type display?
Thanks in advance,
- Richard
This works fine, what is not working is when after adding the new line I issue a .ScrollTo(0, 0, width, height) it doesn't scroll. I've also tried .ScrollPercent = 100 which has the same effect. It acts as if the maximum scroll height is staying the same until after the render event. I even tried moving the ScrollTo to the render event just prior to the Stage.Draw from the "add line" routine and it makes no difference.
I can manually scroll to the bottom via the scrollbar or swipe to scroll but every time I add a new "line" to the display, the .ScrollTo method in code only scrolls down to the previously added line.
How can I have it scroll properly, or is there a more suitable way of creating a "chat text" type display?
Thanks in advance,
- Richard