|
|
|
|
#1 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
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 |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
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 Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You're using SetCtlColors with constants. I want to use variables but NSIS seems to only support compile time constants for the colours.
-Stu |
|
|
|
|
|
#4 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Is this the case?
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
If I correctly understood script.cpp, this is hard coded place
So you can redirect this as a feature request
|
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
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 |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
For now I've coloured the background of the static control through the plugin instead.
-Stu |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Apr 2004
Posts: 130
|
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}" |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|