2

I can create controls and other elements on a custom dialog, but I cannot seem to apply a desired color to the text in labels.

What I've tried-

${NSD_CreateLabel} 25% 15u 25% 15u "${SPEC_CPU_MIN} MHz"
Pop $lCPU_min
CreateFont $R9 "" 9 $R7
SendMessage $lCPU_min ${WM_SETFONT} $R9 0
${NSD_AddStyle} $lCPU_min ${SS_CENTER}

SetCtlColors $lCPU_min "" "0xfff799"

This simply fills the rectangle BEHIND the text. Does not affect the font itself. Then I tried this -

SetCtlColors $lCPU_min "0xfff799" ""

This one simply had no effect whatsoever.

Any suggestions?

I'm using NSIS 2.46.

fassetar
  • 615
  • 1
  • 10
  • 37
Samik Sengupta
  • 1,944
  • 9
  • 31
  • 51

1 Answers1

2

"" is not documented as a valid background color, try SetCtlColors $lCPU_min 0xFF0000 0x00FF00 or SetCtlColors $lCPU_min 0xFF0000 transparent

Anders
  • 97,548
  • 12
  • 110
  • 164