Skip to content
⌘ NSIS Forum Archive

How can color ComboBox?

4 posts

Kuppy#

How can color ComboBox?

How can color ComboBox control with the same color as the window?
Sorry.
Google translate offered me a bad translation.
Anders#
Without any useful information it is hard to tell what is going on.

With something like
Page Custom MyPageCreate
Page InstFiles

!include nsDialogs.nsh
Function MyPageCreate
nsDialogs::Create 1018
Pop $0
${NSD_CreateComboBox} 0 0 100% 100u "Hello, welcome to nsDialogs!"
Pop $0
${NSD_CB_AddString} $0 "Hello world"
SetCtlColors $0 ffff00 00ffff
${NSD_CreateDropList} 0 20u 100% 100u "Hello, welcome to nsDialogs!"
Pop $0
${NSD_CB_AddString} $0 "Hello world"
SetCtlColors $0 ffff00 00ffff
nsDialogs::Show
FunctionEnd
then the ComboBox only gets a little bit of color and DropList seems to work OK. If you use XPStyle On then the colors are ignored completely.

Don't expect this to get fixed because the ComboBox is a really stupid control, it custom draws its borders and the sizes are locked down.