- NSIS Discussion
- Change the component Background color
Archive: Change the component Background color
Joel
31st January 2003 22:31 UTC
Change the component Background color
Is there a way to change the Background color of the component list,
Change the "white" block with, for example, the customize color define in BGColor :igor:?
If not, that would be a cool new feature for next release....
:up:
kichik
1st February 2003 11:43 UTC
TVM_SETBKCOLOR should do the trick:
define TVM_SETBKCOLOR 0x111D
FindWindow$0 "#32770" "" $HWNDPARENT
GetDlgItem$0 $0 1032
SendMessage$0 ${TVM_SETBKCOLOR} 0 0xFF00FF
>
Put this in the post creation function of the components page.
This will work on:
Windows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0
virtlink
1st February 2003 14:52 UTC
Not Windows XP? Or does it only work in Windows XP when the XP-themes are off?
kichik
1st February 2003 14:56 UTC
Whoops, sorry. That's the minimum.
virtlink
1st February 2003 14:59 UTC
So it should be:
Windows 2000 and above, Windows NT 4.0 and above with Internet Explorer 4.0 and above, Windows 98 and above, Windows 95 with Internet Explorer 4.0 and above, Windows XP and above
Joel
1st February 2003 15:17 UTC
Cool, thanks guys.... but how about this:
Windows 95/NT 4.0 or above with IE 4
Joel
1st February 2003 15:55 UTC
Ok, I try it, no error...that's good :), but is still showing the white color :(, put this... (may be I'm wrong)...
Function PaintComp
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1032
SendMessage $0 ${TVM_SETBKCOLOR} 0 FF00FF
FunctionEnd
Page components PaintComp
kichik
1st February 2003 17:07 UTC
That's almost right. You need to make this function the post creationg function. That means:
Page components "" PaintComp
Joel
1st February 2003 20:35 UTC
Nothing dude :(
Joel
1st February 2003 20:40 UTC
Nothing dude... :(
deguix
1st February 2003 21:02 UTC
This line is wrong:
SendMessage $0 ${TVM_SETBKCOLOR} 0 FF00FF
>
So try this code:
define TVM_SETBKCOLOR 0x111D
Page components"" PaintComp
>Function PaintComp
FindWindow$0 "#32770" "" $HWNDPARENT
GetDlgItem$0 $0 1032
SendMessage$0 ${TVM_SETBKCOLOR} 0 0xFF00FF
FunctionEnd
>
It works fine for me!:)
Joel
1st February 2003 21:15 UTC
Nothing
no, :(
here is my script
deguix
1st February 2003 22:38 UTC
Hmmm... Have to be a modification in "{NSISDIR}\Contrib\Modern UI\System.nsh" to easy this work to change components box color. Now it's impossible to use !define MUI_COMPONENTSPAGE and change this in the same time. Maybe a !define_COMPONENTSPAGE_COLOR should be added.
Joel
2nd February 2003 01:41 UTC
Yeah, !define_COMPONENTSPAGE_COLOR should be added to match the set of BGCOLOR and Installcolors... hope Nsis creators take this as a feature in next CVS
:thumbsup:
kichik
2nd February 2003 16:18 UTC
A nicer way to change this color will be added in version b2. For b1, Joost is working on an easier way to change page functions (pre, show and leave) in the MUI.
Joel
2nd February 2003 18:02 UTC
Ok, thanks !!!
Ok, I'll just wait for B2... thanks :D
Joost Verburg
2nd February 2003 18:50 UTC
I added a new way of customizing the Modern UI Functions. Example:
!define MUI_CUSTOMFUNCTION_COMPONENTS_SHOW changeCompColor
Function changeCompColor
...change the color...
FunctionEnd
Joel
3rd February 2003 00:20 UTC
wow
cool, dudes...now works !!!! :up: and works fine :p
Joel
22nd February 2003 17:36 UTC
ok...Now I have this:
!define MUI_CUSTOMFUNCTION_DIRECTORY_SHOW "changeTextColor"
Function changeTextColor
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1019
SendMessage $0 ${WM_CTLCOLOREDIT} 0 0xFCF1E1
FunctionEnd
I try to change the background color of the edit control,
The textbox, wich contains the Instalation path.
But still showing in white... whats wrong
kichik
22nd February 2003 17:41 UTC
You need to receive that message and respond to it, not send it. That is not currently possible with NSIS.
Joel
22nd February 2003 17:44 UTC
:( ok... isnĀ“t another way like in the components color?
kichik
22nd February 2003 18:15 UTC
Nope, not without changing the source.
Joel
22nd February 2003 18:17 UTC
ok, thanks