Author Topic: Scrollview thinks it's larger than it really is?  (Read 1264 times)


  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Scrollview thinks it's larger than it really is?
« on: June 18, 2014, 12:12:29 PM »
I'm having a problem with the scroll view functionality. For an example of the problem, lets say I make a scrollview that could fit 8 of my objects horizontally in it. Then I make 10 of my objects. I will see 8 on screen, the other 2 are clipped off, but it gives NO scrollbar.

If I change the scrollbar show condition to Always, it seems to be working okay, but a slight problem is the thumb on the scrollbar shows very tiny, as if it would look if there were many objects on the list.

To make the problem even weirder, if I reduce it to only 3 objects on the list, it seems to be aligned properly upon hitting play, but when I move the scroll bar to the right, it actually drags those 3 objects to the right side of the panel. It's as if it thinks there are a number of objects before my objects appear?

The scrollbar is not appearing and the objects are aligning as if the scrollview is larger than it actually is, and I'm not sure why? I've been messing with the settings such as content origin, but even if I attempt to set the origin to "top left" when I hit play they are aligned properly, but I can scroll to the left even more. If I set top left origin on my scrollview, isn't that supposed to be to the top left of the contents inside the panel? Becuase it's only setting to the top left of the scrollview as it's rendered on screen, but is not aligned to the top left of the contents inside the scroll view...

Hope this makes sense, hard to explain.

Any help would be appreciated.


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrollview thinks it's larger than it really is?
« Reply #1 on: June 18, 2014, 04:47:13 PM »
Do you see an orange outline in the scene view? That orange outline is the bounds of the content inside your scroll view. If the scroll view lets you scroll past your content, then there is something else in there. The scroll view should only contain the scrollable items -- not the background or anything else.

Also, what version of NGUI are you using?