Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Touchenabled not working on labels?

I have a button, where I have to place text on it with several labels.
However, when clicking on these labels, the button should be clicked.
Currently this is not the case. I have set the touchenabled on the labels to false, but this doesn't seem to do anything.

While searching these forums, I found a workaround with placing a transparent view over the labels, and making that clickable.
However, for me that's not a workable solution, as the button's state changes to a different image when clicked, and this can not be achieved with a transparent view.
Any pointers? Why doesn't touchenabled=false work on a label?

— asked September 16th 2010 by Martijn Pannevis
  • button.
  • iphone
  • label
  • touchenabled
1 Comment
  • I have the same problem. Any help would be appreciated.

    — commented November 23rd 2010 by Martin Juell

1 Answer

  • I had the same problem.
    seems to be fixed… tried on iPhone and android. works.
    1.8.2.

    — answered March 2nd 2012 by Sergio D.
    permalink
    1 Comment
    • Seems we may have a regression here - using Ti SDK 2.1.4GA - label with touchEnabled: false placed on table row with table listening for 'click' event. In Emulator clicking on the label does not fire the table's click event. Clicking just outside the label does.

      — commented November 30th 2012 by Patrick Mounteney
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.