Reputation: 87
I am Using titanium classic for my HTML5 application. I would like to change the left navigation button having a title "Back" to the title "Cancel". I have tried to update the button using "leftNavButton" property, but of no use. Can any one please let me know how to change the text.
Thanks, Swathi.
Upvotes: 0
Views: 54
Reputation: 176
Can you post a sample of your code?
Typically you need to add a Ti.UI.Button with the attributes you want (plus event handler), then assign this to the Window.leftNavButton property.
So:
var button = Ti.UI.createButton({title:'Cancel'});
button.addEventListener('click', function(){
// handle it here
});
// assuming you have the window in 'win' variable
win.leftNavButton = button;
Upvotes: 2