Author Topic: UIGrid / UITable items with variable height in Timeline ScrollView  (Read 3924 times)

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
UIGrid / UITable items with variable height in Timeline ScrollView
« on: September 05, 2014, 07:14:55 AM »
Hi,

I'm having some trouble with a ScrollView i'm creating. I'm having the user fill in some text and settings in a Panel. When the user taps on Done, it then instantiates a prefab in the Timeline. The user is able to fill in as much text as he wants to so for instance the height of a Timeline item can be 500 pixels or 800 depending how much text is filled in. So how do I add this prefab to a Grid or UITable with the variable height? I'm guessing I need to use a UITable, but how does that exactly work when adding the items dynamically and resizing the widget height?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIGrid / UITable items with variable height in Timeline ScrollView
« Reply #1 on: September 05, 2014, 01:21:44 PM »
UIGrid is always fixed size, but UITable is flexible and will automatically shrink / expand based on its contents. If you label grows, the table will adjust automatically, provided you notify it that it needs to adjust its bounds.