Is there a method of accessing a widget's images directly?

Is there a method of accessing a widget’s images directly?

For instance accessing the defaultFile or overFile of a widget button?

Something like:

button = widget.newButton ( buttonOptions ) button.\_view.\_defaultFile.isVisible = false

Thanks!

Found something that will work here and am guessing my answer is no, you don’t have direct access?

It will work but doesn’t answer my question completely: 

http://forums.coronalabs.com/topic/46397-accessing-image-in-widget-button/?hl=%2Bchange+%2Bimage+%2Bbutton

It all depends on what you wanted to do with the images.

My desire was only colour related with the added bonus of cutting down graphics production time and also reducing app size.

If you were looking for a Yes/No answer - based on my knowledge it’s a NO. (and it has been a topic that i actively follow.)

T.

Any thing with an _ in the name should be considered a private variable and subject to change in future releases.

While many people have reached into some of these inner variables to make the widgets work for them, we in no means guarantee that future versions will work.  Use at your own risk.

Our widgets can’t possibly handle all use conditions.  We make them open source (http://github.com/coronalabs) so you can take the code and build it to fit your own needs.  Also buttons are probably the easiest things to do with out widgets.  Many people spend a lot of time trying to make widgets do special things when two images stacked on top of each other, with touch listeners that show/hide each other is probably less code than writing out a widget.newButton() specification.

Rob

Thanks for the tip!

Found something that will work here and am guessing my answer is no, you don’t have direct access?

It will work but doesn’t answer my question completely: 

http://forums.coronalabs.com/topic/46397-accessing-image-in-widget-button/?hl=%2Bchange+%2Bimage+%2Bbutton

It all depends on what you wanted to do with the images.

My desire was only colour related with the added bonus of cutting down graphics production time and also reducing app size.

If you were looking for a Yes/No answer - based on my knowledge it’s a NO. (and it has been a topic that i actively follow.)

T.

Any thing with an _ in the name should be considered a private variable and subject to change in future releases.

While many people have reached into some of these inner variables to make the widgets work for them, we in no means guarantee that future versions will work.  Use at your own risk.

Our widgets can’t possibly handle all use conditions.  We make them open source (http://github.com/coronalabs) so you can take the code and build it to fit your own needs.  Also buttons are probably the easiest things to do with out widgets.  Many people spend a lot of time trying to make widgets do special things when two images stacked on top of each other, with touch listeners that show/hide each other is probably less code than writing out a widget.newButton() specification.

Rob

Thanks for the tip!