Solved I can not understad 'int colourId' in 'setColour' from a Label
-
I can't understand the syntax of:
'ScriptLabel.setColour(int colourId, int colourAs32bitHex)'
what is the integer colourId?
I want to set a yellow colour on my label, but it do not trigger:lblTempo.setColour(lblTempo.textColour 0xccc8b448);
Can I have an example? I understand it may seem trivial but I can't set the color via scripting
-
@Mighty23 just use set:
ScriptLabel.set("bgColour", Colours.yellow);
-
@Mighty23 I've never used this functions before. Generally to set component properties you just use the
set()
function and pass in the property name. LikemyLabel.set("bgColour", Colours.yellow);
etc.But looking at the docs, it seems the IDs are specified (BG, IT1, IT2, TXT) - I don't know if these are strings or constants though...
-
@d-healey , @Christoph-Hart thanks for the solution:
ScriptLabel1.set("textColour", 0xccc8b448);
-