Author Topic: How to get the actual width of UILable when ResizeHeight model?  (Read 1856 times)

xiaoniaojjj

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
How to get the actual width of UILable when ResizeHeight model?
Or calculate the width.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to get the actual width of UILable when ResizeHeight model?
« Reply #1 on: May 10, 2014, 01:34:53 AM »
label.width?

xiaoniaojjj

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
Re: How to get the actual width of UILable when ResizeHeight model?
« Reply #2 on: May 10, 2014, 04:29:20 AM »
When i set the OverFlow is ResizeHeight, the label.width always is Dimensions's width.
But i want to get the "W1" , see the picture.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to get the actual width of UILable when ResizeHeight model?
« Reply #3 on: May 10, 2014, 11:56:24 PM »
Ah, NGUIText.CalculatePrintedSize