change color of multiple mui buttons

Hi,

I have an array of newRectButtons and would like  to change color of several buttons.

getWidgetByName delivers the widget data but how can I change the color of the found widget 

(there is no setFillColor method) ?

kind regards

Sven

Hi Sven. I don’t recognize api’s named newRectbuttons or getWidgetByName as part of Corona’s core or our widget library. Are you using some third-party library?

Rob

sorry for missing information. I use the business app material-ui (https://github.com/arcadefx/material-ui) I think I switch to the standard widget library …

The material UI is a good library and quite a few people use it. If you want your app to look like a modern Android app, I would suggest you stick with it. But since it’s third-party, and I have no personal experience with it, I can’t provide any advice. But there could be community developers who can help you.

It starts though with you providing some code showing what you’re doing and where you’re struggling. Please use the blue <> button in the row the Bold and Italic and paste your code into the popup window so it formats correctly. 

Rob

ok I got it, just have to reference rrect 

local btn = mui.getWidgetByName(name) btn.rrect:setFillColor(color)

Hi Sven. I don’t recognize api’s named newRectbuttons or getWidgetByName as part of Corona’s core or our widget library. Are you using some third-party library?

Rob

sorry for missing information. I use the business app material-ui (https://github.com/arcadefx/material-ui) I think I switch to the standard widget library …

The material UI is a good library and quite a few people use it. If you want your app to look like a modern Android app, I would suggest you stick with it. But since it’s third-party, and I have no personal experience with it, I can’t provide any advice. But there could be community developers who can help you.

It starts though with you providing some code showing what you’re doing and where you’re struggling. Please use the blue <> button in the row the Bold and Italic and paste your code into the popup window so it formats correctly. 

Rob

ok I got it, just have to reference rrect 

local btn = mui.getWidgetByName(name) btn.rrect:setFillColor(color)