New Button Widget.

Hello Everyone,

I updated to the latest daily build and all my buttons have disappeared. I have the text part of the button and it works if I click where the button should be. It just does not show the actual back part of the button. Below is the code from one of the buttons. Any help is certainly appreciated.

local btnbaseball = widget.newButton{ label = "Go", labelColor = { default={ 0, 0, 0, 255 }, over={ 0 } }, defaultColor = { 0, 0, 0, 0 }, overColor = { 0, 0, 0, 0 }, strokeColor = { 0, 0, 0, 0 }, width = 80, height = 38, fontSize = 18, onRelease = btnbaseball\_Click } btnbaseball.x = 268 btnbaseball.y = 121 screenGroup:insert( btnbaseball )

The simulator defaults to iOS7 widget theme, which doesn’t show the button backgrounds. You can force the theme to iOS or Android to bring back the buttons

This is great news but how do you force the button.

Thanks again

Figured it out. 

widget.setTheme( “widget_theme_ios” )

Tom, is there a way to keep the IOS7 theme so that other elements comply with IOS7 look but get the button borders etc? Thanks

The iOS 7 design pattern uses borderless text buttons.  You of course can still use 2 images, 9-slice or imageSheet based buttons.

Rob

The simulator defaults to iOS7 widget theme, which doesn’t show the button backgrounds. You can force the theme to iOS or Android to bring back the buttons

This is great news but how do you force the button.

Thanks again

Figured it out. 

widget.setTheme( “widget_theme_ios” )

Tom, is there a way to keep the IOS7 theme so that other elements comply with IOS7 look but get the button borders etc? Thanks

The iOS 7 design pattern uses borderless text buttons.  You of course can still use 2 images, 9-slice or imageSheet based buttons.

Rob