Refreshing labels after color change

From NSIS Wiki

Author: Afrow UK (talk, contrib)


Description

Requires: inclusion of WinMessages.nsh header file.

When changing the text or color of a label, with transparent as the background color, you will find that the old text or color will still exist under the new one.

To fix this, you need to refresh the label. The easiest way to achieve this is by hiding the label and then showing it again.

Example

  GetDlgItem $R0 $HWND 1200
  ShowWindow $R0 ${SW_HIDE}
  SetCtlColors $R0 00FF00 transparent
  ShowWindow $R0 ${SW_SHOW}

-Stu

Personal tools
donate
ads