Archive: label transparents with background-image


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


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


thanks ... it works!


  ; 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 :-(

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


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) ?


Are you using Windows XP and XPStyle on?

-Stu


WinXP and XPStyle OFF :-)


Please attach the entire code in question.

-Stu


here it is ...


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


LoL ... I just realized the crap I wrote in topic :-))

"label transparents" ... OMG :-)


Check boxes are a bit problematic:

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


It doesn't even work with labels :-(


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:

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