Archive: SetCtlColors issue


SetCtlColors issue
This is probably by design, but SetCtlColors does not accept variables for its colour paramaters. I'd like to set colours of a static label on an IO dialog at run time to colours defined at run time and not compile time. When using any variable, it comes out black.

Any ideas?
Wasn't even able to find an API to call with System plugin.

-Stu


Hi Stu,
I'm not sure if this is what you're looking for,
I made a trick to change control colours on my last post in this thread
Perhaps you should take a look over there.
regards


You're using SetCtlColors with constants. I want to use variables but NSIS seems to only support compile time constants for the colours.

-Stu


Is this the case?


If I correctly understood script.cpp, this is hard coded place :( So you can redirect this as a feature request ;)


Righto.

Red Wine:
SetCtlColors $setcolor 0x008000 0x80FFFF
The two parameters to set the colours can only be constants. You cannot specify a variable for these parameters for a value at run time.

-Stu


For now I've coloured the background of the static control through the plugin instead.

-Stu


Stu, what do you mean you used a plugin? Is there a plugin out there that will allow changing controls to a certain color in NSIS? I have a color picker dialog box coming up and then I'd like to be able to change the color of a control on the dialog based on the color they picked.

This is working:

SetCtlColors $0 0x0000FF 0x0000FF

But this is not:

StrCpy $R3 "0x0000FF"
SetCtlColors $0 "${R3}" "${R3}"