I have created a menu based on Example 13-Tabs.
I have created a Scrollview on each Tab, with a Grid that is populated at runtime using NGUITools.AddChild(MyGrid, MyPrefab).
I call MyGrid.GetComponent<UIGrid>().Reposition(); after populating each of the grids.
And I call MyGrid.transform.parent.GetComponent<UIScrollView>().ResetPosition(); for each grid on each tab after that.
This works perfectly for the tab that starts as active. But the non-active tab does not reset correctly. The content on the hidden tab starts in the middle of the scrollview rather than the TopLeft. (see screenshot attached).
Any tips on where/when to call ScrollView.ResetPosition on the hidden tab?
I tried calling a specific refresh function from the OnValueChange of the UIToggle script attached to the tab handle which activates the hidden tab, but that didn't seem to fire fast enough.
Of course, once you interact with the content on the hidden tab, everything snaps/works perfectly. Just not at load time of the scene.