Author Topic: Grid anchoring to ScrollView  (Read 6378 times)

stapledon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Grid anchoring to ScrollView
« on: February 12, 2014, 01:06:53 PM »
I've got a Grid as a child of a Scroll View (vertical), and a bunch of elements.

The Scroll view is anchored to another UI element - Only the position and vertical of the ScrollView is affected when switching between resolutions, and this works fine.

However, the grid isn't moving with the ScrollView, and all my elements are off-center, being clipped.

How do I do this properly so the Grid and/or it's contents move with the ScrollView?

Also, every other time I change something, the position of the elements when I play the scene will start in the wrong place - sometimes it's where the grid has been set up (at the top, so they're a top-down list), and sometimes down at the bottom. What gives?

stapledon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Grid anchoring to ScrollView
« Reply #1 on: February 12, 2014, 01:49:50 PM »
Sorted the anchoring by attaching an Anchor.

It would save a lot of headaches if this was included in the Attach-> context menu.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Grid anchoring to ScrollView
« Reply #2 on: February 13, 2014, 12:47:35 AM »
I've addressed this properly in 3.5.0. You can specify a Content Origin point on the scroll view now which determines where the content will begin (for example: top-left). Resizing the scroll view now also keeps your position inside, so if you scrolled to 30%, you will still be at 30% after resizing.

stapledon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Grid anchoring to ScrollView
« Reply #3 on: February 14, 2014, 05:33:48 AM »
Sounds good. Do you have an 3.5 ETA in mind? ;)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Grid anchoring to ScrollView
« Reply #4 on: February 14, 2014, 05:46:47 AM »
Couple of days if everything goes well. It's very stable right now, but there are still a pair of bug reports I haven't looked into.