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({
showCancel:false
});
Oh geez, nevermind, I just had to look in the api.
hintText
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' }); win.add(searchBar);