Afrow UK
26th March 2006 14:43 UTC
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
Red Wine
26th March 2006 17:30 UTC
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
Afrow UK
26th March 2006 19:59 UTC
You're using SetCtlColors with constants. I want to use variables but NSIS seems to only support compile time constants for the colours.
-Stu
Red Wine
26th March 2006 22:06 UTC
Is this the case?
Takhir
27th March 2006 06:36 UTC
If I correctly understood script.cpp, this is hard coded place :( So you can redirect this as a feature request ;)
Afrow UK
27th March 2006 07:38 UTC
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
Afrow UK
2nd April 2006 17:35 UTC
For now I've coloured the background of the static control through the plugin instead.
-Stu
scully13
6th June 2006 19:28 UTC
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}"