Titanium Community Questions & Answer Archive

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

Create hint text for a search bar

I have a tableview with a search bar that I used from the Kitchen Sink. Right now all it says in grey text is "Search". I would prefer if it said "Type a medical term"

Is there any parameter for this? Right now this is my searchbar code:

var search = Titanium.UI.createSearchBar({


Oh geez, nevermind, I just had to look in the api.

— asked December 6th 2010 by Stephen Flynn
  • searchbar

1 Answer

  • Accepted Answer

    You can use the 'hintText' attribute, here is an example

    var searchBar = Titanium.UI.createSearchBar({
       showCancel: true,
       height: 43,
       top: 0,
       hintText: 'Type a medical term'
    — answered December 6th 2010 by Antonio Silveira
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.