Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

change color of multiple mui buttons
Started by Sven52 Jan 18 2019 04:18 AM

4 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Sven52

[GLOBAL: userInfoPane.html]
Sven52
  • Observer

  • 5 posts
  • Corona SDK

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



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,913 posts
  • Enterprise

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



[TOPIC: post.html]
#3

Sven52

[GLOBAL: userInfoPane.html]
Sven52
  • Observer

  • 5 posts
  • Corona SDK

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 ...

[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,913 posts
  • Enterprise

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



[TOPIC: post.html]
#5

Sven52

[GLOBAL: userInfoPane.html]
Sven52
  • Observer

  • 5 posts
  • Corona SDK

ok I got it, just have to reference rrect 

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



[topic_controls]
[/topic_controls]