Old 3rd November 2016, 14:40   #1
Kuppy
Junior Member
 
Join Date: Sep 2016
Posts: 34
How can color ComboBox?

How can color ComboBox control with the same color as the window?
Sorry.
Google translate offered me a bad translation.
Kuppy is offline   Reply With Quote
Old 3rd November 2016, 14:52   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,349
What do you mean by "color window"? Are you talking about SetCtlColors?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 3rd November 2016, 15:19   #3
Kuppy
Junior Member
 
Join Date: Sep 2016
Posts: 34
I tried but it does not work SetCtlColors
Kuppy is offline   Reply With Quote
Old 3rd November 2016, 19:53   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,349
Without any useful information it is hard to tell what is going on.

With something like
Quote:
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.

IntOp $PostCount $PostCount + 1
Anders 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