Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: smallpoul on February 18, 2022, 01:43:29 PM

Title: Change button color from lua code
Post by: smallpoul on February 18, 2022, 01:43:29 PM
Hi,
    all i want to do is to change the background color of a button from within a lua function,
Here what i already try:
Code: [Select]
scr.SetProperty('btnref', 'Bg color', tostring(Green));btnref is the name of the button that i want to change the colors.

Thanks
Title: Re: Change button color from lua code
Post by: SwiftyJ on February 18, 2022, 02:06:24 PM
The colour has to be hex so for green it would be ‘#00FF00’
Title: Re: Change button color from lua code
Post by: smallpoul on February 18, 2022, 02:35:39 PM
ok thanks got it now.