Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: briangibson on August 10, 2014, 01:20:18 PM
-
I instantiate a bunch of UIGrid items on application start. I want to make sure that it scrolls immediately to the top left of the scrollview as soon as the app starts. what is the best way to do this? I tried all these things, and they don't seem to do it:
scrollView.ResetPosition();
scrollView.restrictWithinPanel = true;
scrollView.RestrictWithinBounds(true);
grid.repositionNow = true;
-
this seemed like it maybe worked. http://www.tasharen.com/forum/index.php?topic=9476.msg44658#msg44658
-
false alarm... this doesn't always work. =/ i'm baffled.
-
When you enable or instantiate some UI element, it is not added to the panel right away. Scroll view has no knowledge of it at this point. You need to force it to happen right away by broadcasting "CreatePanel" on the object you instantiated.