Author Topic: UI Label resizeFreely while Anchoring?  (Read 4276 times)

johanesnw

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 22
    • View Profile
UI Label resizeFreely while Anchoring?
« on: February 09, 2014, 11:34:26 PM »
is it possible to resize freely and resize height while anchoring?
If I click on that 2, it always goes to shrinkContent.
the clampContent option is fine tho.

this is the normal label that I anchored to icon's right


set the line max to 1.
when I tried this


can't choose overflow: "resizefreely". so I resize manually on play mode.
it's what I want


if I remove the anchor, it's worse

CJOwens

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: UI Label resizeFreely while Anchoring?
« Reply #1 on: February 10, 2014, 11:59:40 AM »
Having the same problem and it's really frustrating. Is this intended functionality? If so could you elaborate as to why and possibly suggest a workaround/better solution?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Label resizeFreely while Anchoring?
« Reply #2 on: February 10, 2014, 05:17:35 PM »
If you set the label to "resize freely", then it will adjust its width and height accordingly.

You need to use Advanced type anchors if you are mixing anchors and resizeable labels, and set only certain sides to be anchored.

For example to anchor a ResizeFreely label to the top left corner, change its pivot to top-left, set anchors to "Advanced", and only choose the top and left anchors. Don't set bottom and right.

CJOwens

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: UI Label resizeFreely while Anchoring?
« Reply #3 on: February 11, 2014, 09:51:22 AM »
I see, thanks.

johanesnw

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: UI Label resizeFreely while Anchoring?
« Reply #4 on: February 12, 2014, 12:51:21 PM »
wow. works perfectly.... thanks  ;D