Old 26th March 2006, 14:43   #1
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 26th March 2006, 17:30   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
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
Red Wine is offline   Reply With Quote
Old 26th March 2006, 19:59   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 26th March 2006, 22:06   #4
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Is this the case?
Attached Files
File Type: zip ctlcolors.zip (1.1 KB, 293 views)

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
Red Wine is offline   Reply With Quote
Old 27th March 2006, 06:36   #5
Takhir
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
Takhir is offline   Reply With Quote
Old 27th March 2006, 07:38   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 2nd April 2006, 16:35   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 6th June 2006, 18:28   #8
scully13
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}"
scully13 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump