Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-22] API - Titanium.UI.createButton

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:50:09.000+0000
Affected Version/sn/a
Fix Version/sGA - M1
ComponentsiOS
Labelsn/a
ReporterNolan Wright
AssigneeBlain Hamon
Created2011-04-15T02:22:38.000+0000
Updated2011-04-17T01:50:09.000+0000

Description

Description

The purpose of this API is to create a button native control.

Example


var button = Titanium.UI.createButton({id:'foo',title:'My Title', icon:'images/foo.png'})


// add event listneer
button.addEventListener('click',function(event)
{
});

API Arguments

id : optional. HTML element id for where the button will be placed if placed in webview

title : optional. title text on button

icon : optional. path to image file

style : pre-defined button style

systemButton : pre-defined system icon or button (iPhone only)

width : optional. width of button

height : optional. height of button

backgroundImage : optional. path to a background image to be used as the background for the button

color : optional. text color

backgroundColor : optional. background color of field

Comments

  1. Jeff Haynie 2011-04-15

    resolved in 0.5

JSON Source