Swathi
Swathi

Reputation: 87

Change the HTML5 left navigation button title in Titanium

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

Answers (1)

jasonkneen
jasonkneen

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

Related Questions