Author Topic: Expanding a widget to fit a "resizeHeight" label causes widget to float away!  (Read 3721 times)

sintua

  • Jr. Member
  • **
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 63
    • View Profile
Heyo! So I have a UIPLabel which is simply a label with a button behind it that expands to fit the label as it gets longer, and a title on top.


However, The actual dimensions of the base widget (shown in the picture below) *were* hardcoded to the size of the titlebox. The problem with this is when the widget's dimensions go off the scrollview, the REST of the widget (the expanding labelButton) is culled!


I tried setting the base widget's dimensions to anchor to the Buttons, ensuring it wont be prematurely culled when scrolling... except this makes the whole label box float up into the scrollview, wavering left and right seemingly at random.


If I remove the anchors from the base widget it stops floating away, but then the old problem of the label being prematurely culled is back.


Is this a bug with anchoring to a resizing label? Or something else?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
You must have them set up as one being a child of another. Make them be siblings instead. Instead of:

Scroll View
- Header
-- Anchored Content

make it be:

Scroll View
- Header
- Anchored Content