Author Topic: UIGrid can't be used as anchor target  (Read 3018 times)

WakeZero

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
UIGrid can't be used as anchor target
« on: December 12, 2013, 02:48:49 AM »
First off, I am loving the new anchor system. It's much more intuitive than the old system.

I have one problem though: I can't use a UIGrid as an anchor point. The deprecated stretch and anchor scripts however treat it just fine.

What I am trying to do is have a tiled sprite as a background in the scroll view window that moves with the elements in the UIGrid. I then want to overlay a gradient over the tiled sprite so one end is one color, and the other end is another. To do this however, I need the tiled sprite to be the length of the UIGrid.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIGrid can't be used as anchor target
« Reply #1 on: December 12, 2013, 06:16:17 AM »
I would suggest creating a UIWidget container, then add your grid underneath it. This way you will have actual dimensions.

Scroll View
- Widget
-- Grid
--- Child1
--- Child2
--- Child3