I have 2 scroll views side by side.
I am using code
if(lastSelectedItem.Left) // buy
{
lastSelectedItem.transform.parent = RightGridControl.transform;
lastSelectedItem.GetComponent<UIDragScrollView>().scrollView = RightScrollViewControl.GetComponent<UIScrollView>();
}
else //sell
{
lastSelectedItem.transform.parent = LeftGridControl.transform;
lastSelectedItem.GetComponent<UIDragScrollView>().scrollView = LeftScrollViewControl.GetComponent<UIScrollView>();
}
lastSelectedItem
.transform.localScale = new Vector3
(1,
1,
1);
leftGrid.Reposition ();
rightGrid.Reposition ();
LeftScrollViewControl.GetComponent<UIScrollView>().UpdatePosition();
LeftScrollViewControl.GetComponent<UIPanel> ().Refresh ();
RightScrollViewControl.GetComponent<UIScrollView>().UpdatePosition();
RightScrollViewControl.GetComponent<UIPanel> ().Refresh ();
This is called when a button is clicked and it does move an item from one UIGrid in one scrollview to UIGrid in another scrollview and UIGrid calculates correctly but the item simply doesn't get displayed.
I am calling Refresh on the scrollview control. What am i doing wrong?
The attached picture is supposed to show 2 items, but the 2nd one isn't displaying