Old 4th June 2006, 11:29   #1
TobWen
Junior Member
 
Join Date: Apr 2001
Posts: 44
Send a message via ICQ to TobWen
Question label transparents with background-image

Hey,

I've created a custom page with an image in the background.
Of course, the text-labels have gray background.

I've changed them the normal way (SetCtlColors).
It's possible to set every color, but transparency is always set to gray.
I think, it sets the color of the dialog behind the image, not the image itself.

Is there a work-around? I've searched already, but didn't find a working solution

Best regards,
Tobias
TobWen is offline   Reply With Quote
Old 4th June 2006, 11:33   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You may need to refresh the control. Easiest way to do this is to hide the control and then show it again using:

ShowWindow $R0 ${SW_HIDE}
ShowWindow $R0 ${SW_SHOW}

-Stu
Afrow UK is offline   Reply With Quote
Old 4th June 2006, 11:46   #3
TobWen
Junior Member
 
Join Date: Apr 2001
Posts: 44
Send a message via ICQ to TobWen
thanks ... it works!
TobWen is offline   Reply With Quote
Old 4th June 2006, 12:33   #4
TobWen
Junior Member
 
Join Date: Apr 2001
Posts: 44
Send a message via ICQ to TobWen
code:
; Give labels a transparent background
GetDlgItem $0 $0 1200
SetCtlColors $0 0xFFFFFF transparent
GetDlgItem $0 $0 1208
SetCtlColors $0 0xFFFFFF transparent

; Reload window
GetDlgItem $0 $HWNDPARENT 1
ShowWindow $0 ${SW_HIDE}
ShowWindow $0 ${SW_SHOW}



it only changes "item 1200" ... and it doesn't work for buttons :-(

Last edited by TobWen; 4th June 2006 at 12:53.
TobWen is offline   Reply With Quote
Old 4th June 2006, 13:04   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You should change controls in the parent window (i.e. Next button, Back button etc) in .onGUIInit.

If you're using Modern UI then you'd need to !define MUI_CUSTOMFUNCTION_GUIINIT onGUIInit

-Stu
Afrow UK is offline   Reply With Quote
Old 4th June 2006, 13:30   #6
TobWen
Junior Member
 
Join Date: Apr 2001
Posts: 44
Send a message via ICQ to TobWen
I mean checkboxes and their labels. I'm using classic UI.

But why is just the first label changed (1200) and not the second (1208) ?
TobWen is offline   Reply With Quote
Old 4th June 2006, 17:19   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Are you using Windows XP and XPStyle on?

-Stu
Afrow UK is offline   Reply With Quote
Old 4th June 2006, 17:22   #8
TobWen
Junior Member
 
Join Date: Apr 2001
Posts: 44
Send a message via ICQ to TobWen
WinXP and XPStyle OFF :-)
TobWen is offline   Reply With Quote
Old 4th June 2006, 17:25   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Please attach the entire code in question.

-Stu
Afrow UK is offline   Reply With Quote
Old 4th June 2006, 17:43   #10
TobWen
Junior Member
 
Join Date: Apr 2001
Posts: 44
Send a message via ICQ to TobWen
here it is ...
Attached Files
File Type: zip installoptions.zip (2.5 KB, 363 views)
TobWen is offline   Reply With Quote
Old 4th June 2006, 18:53   #11
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Hmm strange. Transparent doesn't seem to be working for it at all. And by the way, the control ID is 1210 for the check box (it's Field 8 - 1 + 3)... +3 because each DirRequest control has two controls; the text box and the command button.

Interestingly, if I use transparent for its background and use XPStyle on, the background turns black!

Perhaps you should contact kichik about this (or wait for him to reply).

-Stu
Afrow UK is offline   Reply With Quote
Old 5th June 2006, 16:41   #12
TobWen
Junior Member
 
Join Date: Apr 2001
Posts: 44
Send a message via ICQ to TobWen
LoL ... I just realized the crap I wrote in topic :-))

"label transparents" ... OMG :-)
TobWen is offline   Reply With Quote
Old 16th June 2006, 08:08   #13
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Check boxes are a bit problematic:

http://forums.winamp.com/showthread....x+setctlcolors

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th June 2006, 22:35   #14
TobWen
Junior Member
 
Join Date: Apr 2001
Posts: 44
Send a message via ICQ to TobWen
It doesn't even work with labels :-(
TobWen is offline   Reply With Quote
Old 30th June 2006, 20:49   #15
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
At least for the labels, you're using the wrong dialog item id. You should read the HWND value from the INI after calling initDialog. It's much simpler than calculating the correct id. To get the HWND of the browse button, read HWND2. Use:
code:
ReadINIStr $0 "$PLUGINSDIR\options.ini" "Field 2" "HWND"
SetCtlColors $0 0x000000 transparent

ReadINIStr $0 "$PLUGINSDIR\options.ini" "Field 3" "HWND"
SetCtlColors $0 0x000000 transparent

ReadINIStr $0 "$PLUGINSDIR\options.ini" "Field 8" "HWND"
SetCtlColors $0 0x000000 transparent


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik 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