Author Topic: Label Width after UIInput  (Read 2832 times)

amospatrick

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Label Width after UIInput
« on: October 15, 2013, 08:45:38 AM »
When I dynamically input text into a label, I would like to resize the background sprite so it fits nicely. However, it appears that there is a delay between when the "OnInputChanged" message is sent and when the UILabel width is updated. Any suggestions?

amospatrick

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Label Width after UIInput
« Reply #1 on: October 15, 2013, 01:22:13 PM »
Ah, found a way. If you subscribe the the Panel's OnChange event, the UILabel's size will be updated and you can adjust the background sprites accordingly.