Author Topic: Problem with a scroll view  (Read 2923 times)

Alessaint

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 67
    • View Profile
Problem with a scroll view
« on: February 25, 2014, 01:17:36 AM »
I have a horizontal scrollview with a grid that is filled with items instantiated at runtime. After they are instantiated I run Reposition() on the grid and everything looks fine. The problem is that when I drag the item away from the scroll view and release so it returns back to the grid the scrollview y position changes - the scrollview moves down a bit. Any idea why does this happen? Thanks.

EDIT: this seems to happen when processing RestrictWithinBounds - is it possible that this isn't taken into account when repositioning the new elements but only when one gets returned to its child grid?
« Last Edit: February 25, 2014, 01:22:58 AM by Alessaint »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with a scroll view
« Reply #1 on: February 25, 2014, 02:58:15 PM »
Restrict function should only adjust position on the axes that are possible by the scroll view itself. So if you set the scroll view to be horizontal, then it won't move along the Y at all. Other than that, I can't tell you why yours is moving as I don't know anything about your setup.