Author Topic: [Possible bug]UILabel does not spawns onChange event when text is set  (Read 4450 times)

artfabrique

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 45
    • View Profile
When the dimensions of UILabel are changed by setting a text with new length (resize freely mode) - the onChange event is not called.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [Possible bug]UILabel does not spawns onChange event when text is set
« Reply #1 on: April 29, 2016, 12:36:29 PM »
UILabels don't have an onChange event. What are you referring to?

artfabrique

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 45
    • View Profile
UILabels don't have an onChange event. What are you referring to?
UILabel inherits UIWidget.
UIWidget has OnChange.
When UILabel changes dimensions of its UIRect(because of resize freely) the event OnChange is not triggered.
But, when UILabel is set to shrink content and when i manually change the dimensions of UILabel - OnChange event is triggered properly.

This is inconsistent behaviour because in both cases UIRect dimensions are changed but only in one case the event is triggered.
« Last Edit: May 04, 2016, 08:36:38 AM by artfabrique »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Alright, fair enough. I can make it be called from the resize changes as well.