Titanium Community Questions & Answer Archive

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

Search by createLabel in createSearchBar

hey!

im pushing data to array like:

var row = Ti.UI.createTableViewRow({
height:60,
selectionStyle:Ti.UI.iPhone.TableViewCellSelectionStyle.NONE,
hasChild:true,
custom_field:"123"        
});

var label_name = Titanium.UI.createLabel({ text: row.custom_field, font:{fontSize:16,fontWeight:'bold'}, width:'auto', textAlign:'left', top:4, left:40, height:18 });

row.add(label_name);
data.push(row);

and now, im adding search to tableview

var search = Titanium.UI.createSearchBar({ barColor:"#385292", showCancel:false });

and the question is..
what should i add to createSearchBar, what variables to search by label_name?? default is title var in row..

— asked May 28th 2010 by Michal G
  • createlabel
  • createsearchbar
0 Comments

1 Answer

  • Michal,

    Hope you have accomplished the search tags you are looking for.

    This is from the kitchen sink and should help you along (unless you have already solved your issue):

    Click here to check out the example

    Best wishes!
    -Jesse

    — answered August 12th 2011 by Jesse Benedict
    permalink
    0 Comments
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.