Widget button not showing

Hi

What am I missing here. Using this code from the game templates, and looking at tutorials, this simple code should place a button on the screen with play. I am only getting the word “play”, no button. Adjusting the font, height width etc makes no difference to the text and no button. The graphics .png are not missing.

Any help would be much appreciated… 

– create a widget button (which will loads level1.lua on release)

playBtn = widget.newButton{

label=“Play Now”,

labelColor = { default={255}, over={128} },

default=“button.png”,

over=“button-over.png”,

width=154, height=40,

onRelease = onPlayBtnRelease – event listener function

}

playBtn.x = display.contentWidth*0.5

playBtn.y = display.contentHeight - 125

Hi @andrew085,

The correct property names are actually “defaultFile” and “overFile”, as noted in the documentation:

http://docs.coronalabs.com/api/library/widget/newButton.html

Take care,

Brent

Hi @andrew085,

The correct property names are actually “defaultFile” and “overFile”, as noted in the documentation:

http://docs.coronalabs.com/api/library/widget/newButton.html

Take care,

Brent