Titanium Community Questions & Answer Archive

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

Clear textField Button

In the KitchenSink app, if you go to the Controls tab, then go to Text Field > The Rest and then you click on the text field (give it focus), you'll notice a little "x" image shows up on the right that lets you clear the text field.

I looked all through textfield_therest.js for where this might be instantiated, and I don't see it.

Does anyone know how I can access this feature?

Thanks!

— asked June 23rd 2010 by Clifton Labrum
  • clear
  • textfield
0 Comments

1 Answer

  • clearButtonMode: Titanium.UI.INPUT_BUTTONMODE_ONFOCUS

    clearButtonMode: Titanium.UI.INPUT_BUTTONMODE_ALWAYS

    etc…

    It's all in that file.

    — answered June 25th 2010 by Xiao Jin
    permalink
    3 Comments
    • I assume this is ignored on Android or is there a way of displaying the clear-x in the textfield for Android? Is there a way to put any icons in the textfield?

      a little more documentation would have been nice - the API does not really answer questions like this one.

      — commented November 24th 2011 by Matthias Muehlich
    • Matthias, I have to implemented the clear text button in android. Please let me know have u done this and how?

      — commented October 29th 2012 by sumit gulati
    • I cannot see any X in the textfield… please let me know

      — commented November 7th 2013 by S Ayyagary
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.