how to set a backgroundColor from a js in appcelerator Titanium Alloy MVC -


i have small question setting tab names dynamically.

i thinking create options.js , want tab names gather data options.js

<alloy> <tabgroup>     <tab title="tab 1" icon="ks_nav_ui.png">         <window class="tab1" title="tab 1">             <label>i window 1</label>             <button class="examplebut">button </button>         </window>     </tab> </tabgroup> </alloy> 

i set tab 1 title js file.

how solve ?

regards

you have identify tab unique id

 <tab title="tab 1"  id='tab1' icon="ks_nav_ui.png"> 

in same js file exemple index.js (the tab defined in index.xml) can use :

$.tab1.title="my title" 

if set title js file can use application events: in index file define application event listener :

ti.app.addeventlistener("app:changetabtitlle",function(e){                             $.tab1.title=e.title;                         }); 

and other js file have send tab title using fireevent:

ti.app.fireevent("app:changetabtitlle",{title:"my tab title"}); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -