How can I set visual state of a widget.newButton()

I have a number of buttons that the user can drag over to select them. Currently the first button pressed changes to its pressed state but when I drag off it to another button it returns to its unpressed state. Is there anyway to keep the button in its pressed state until the user take their finger off the screen?

I have tried change the embossed property but that doesn’t seem to work.

Thanks!

The embossed property is about if the text label on the button has an embossed look or not.

I don’t think you can make widget.newButton’s work the way you want.  You’ve got a couple of choices: First the source for widgets is open source which means you can modify them to your own needs.  They can be found at:

https://github.com/coronalabs/framework-widgets

Secondly you can build your own button code using a couple of images drawn on top of each other (or a single image and then tint the image) and control when the pressed state goes away on your own.

Rob

@sberemski, In Widgets 1.0 we could set the colors of buttons. This feature was removed from Widgets 2.0 without much care for what we needed or wanted. Sounds like you could make use of that feature had it been restored by now as it was promised long time ago. Please join me in asking for button color setting feature to be brought back. Regards

The embossed property is about if the text label on the button has an embossed look or not.

I don’t think you can make widget.newButton’s work the way you want.  You’ve got a couple of choices: First the source for widgets is open source which means you can modify them to your own needs.  They can be found at:

https://github.com/coronalabs/framework-widgets

Secondly you can build your own button code using a couple of images drawn on top of each other (or a single image and then tint the image) and control when the pressed state goes away on your own.

Rob

@sberemski, In Widgets 1.0 we could set the colors of buttons. This feature was removed from Widgets 2.0 without much care for what we needed or wanted. Sounds like you could make use of that feature had it been restored by now as it was promised long time ago. Please join me in asking for button color setting feature to be brought back. Regards