Archive: Change the component Background color


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:


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

Not Windows XP? Or does it only work in Windows XP when the XP-themes are off?


Whoops, sorry. That's the minimum.


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

Cool, thanks guys.... but how about this:

Windows 95/NT 4.0 or above with IE 4

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


That's almost right. You need to make this function the post creationg function. That means:

Page components "" PaintComp


Nothing dude :(


Nothing dude... :(


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!:)

Nothing
  no, :(

here is my script


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.


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:


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.


Ok, thanks !!!
  Ok, I'll just wait for B2... thanks :D


I added a new way of customizing the Modern UI Functions. Example:

!define MUI_CUSTOMFUNCTION_COMPONENTS_SHOW changeCompColor

Function changeCompColor
...change the color...
FunctionEnd


wow
  cool, dudes...now works !!!! :up: and works fine :p


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

You need to receive that message and respond to it, not send it. That is not currently possible with NSIS.


:( ok... isnĀ“t another way like in the components color?


Nope, not without changing the source.


ok, thanks