Skip to main content link. Accesskey S

The useful resource for Titanium and YouAtNotes Domino To Go

Submit Search

Home > Titanium > Ti: ButtonBar

Ti: ButtonBar

ShowTable of Contents
HideTable of Contents
A bar with buttons that can be placed anywhere in the view.

Creation



App.buttonbar = Titanium.UI.createButtonBar({
	labels:[{title:'Button 1', enabled:false}, 'Button 2', 'Button 3'],
	backgroundColor:'#336699',
	top:0,
	style:Ti.UI.iPhone.SystemButtonStyle.PLAIN,
	height:25,
	width:500
});


Use the "style" attribut with:

Ti.UI.iPhone.SystemButtonStyle.PLAIN
Ti.UI.iPhone.SystemButtonStyle.BAR
Ti.UI.iPhone.SystemButtonStyle.BORDERED
Ti.UI.iPhone.SystemButtonStyle.DONE

Using images in the buttons:

App.buttonbar = Titanium.UI.createButtonBar({
	labels:[{image:'button1.png', enabled:false},{image:'button2.png', enabled:true} ],
	backgroundColor: '#b2b5ba',
    top:0,
    style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
    height:30,
    width:140
});

Click event


App.topButtonBar.addEventListener('click', function(e) {
// pressed button is stored in e.index
// 0 = first button, 1 = second button and so on
});

Created by Imad on May 15, 2012 11:07:24 AM

Thank you


Add Comment

Name:
Comments:
Use  searchlotus.com  for news in the Web related to Lotus Notes and Domino,
and to search those sites.
Check  youatnotes.com  for great Lotus Notes, Domino and XPages software.