Author Topic: Anchoring on a view with variable items  (Read 5218 times)

TJHeuvel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Anchoring on a view with variable items
« on: March 22, 2017, 04:10:42 AM »
Hi,

I'd like to have my background sprite always encapsulate the contents of a window, but i'm not sure how. The window has a few buttons, the amount changes from time to time. So i tried using the Table and Grid components, and while those did sort them correctly i couldnt anchor a background element to the bottom of them.

How can you anchor to a container that grows?

Thanks in advance

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Anchoring on a view with variable items
« Reply #1 on: March 26, 2017, 07:37:36 AM »
EnvelopContent script is what you're looking for. Put it on your background sprite (and make sure it's outside the window it's targeting!) and it will fully envelop it.