Changing Button Sizes to fit divergent devices

Hello all, a newbee to lua, so sorry for being stupid about this. 

I currently have this widget set up. But the buttonOne is too small for the iPhone4 and 5 , any help is appreciated 

I tried an if statement using this but without avail , keeps crashing 

–[[if display.contentHeight == 480 then

    buttonOne.pixelWidth = 60

    buttonOne.pixelHeight = 50

    end]]

local buttonOne = widget.newButton{

width = 60,

height = 50,

left = halfW,

top = screenH/2,

defaultFile = “ButtonImages/One.png”,

overFile = “ButtonImages/OneOverFile.png”,

onEvent = onButtonOneRelease, – event listener function

}

You need to have dynamic scaling set up in your config.lua

See the following blog post for some advice:

http://coronalabs.com/blog/2013/09/10/modernizing-the-config-lua

BTW.

The reason you get a crash in your if-statement is because you’re trying to access an object that doesn’t exist.

buttonOne is created *after* the if-statement.

Okay, got it seen that and fixed the issue, thank you for your help

JZ

You need to have dynamic scaling set up in your config.lua

See the following blog post for some advice:

http://coronalabs.com/blog/2013/09/10/modernizing-the-config-lua

BTW.

The reason you get a crash in your if-statement is because you’re trying to access an object that doesn’t exist.

buttonOne is created *after* the if-statement.

Okay, got it seen that and fixed the issue, thank you for your help

JZ