Example
(Picture attached)
Function .onInit
InitPluginsDir
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioSpecial.ini"
FunctionEnd
...
Function PageWelcomeUpdateCheckbox
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Settings" "NumFields" "4"
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field 4" "Type" "Checkbox"
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field 4" "Left" "120"
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field 4" "Top" "170"
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field 4" "Right" "250"
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field 4" "Bottom" "180"
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field 4" "Text" "Check for program updates?"
; Bug?: The following line changes the checkbox to the right side (TRANSPARENT is invalid?)
; WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field 4" "Flags" "NOTIFY|TRANSPARENT"
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field 4" "Flags" "NOTIFY"
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field 4" "State" "1"
; Field 3 overlaps the checkbox a little; shrink it.
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field 3" "Bottom" "169"
FunctionEnd
...
!define MUI_PAGE_CUSTOMFUNCTION_PRE "PageWelcomeUpdateCheckbox" ; Add update checkbox
!insertmacro MUI_PAGE_WELCOME
...
(I need to write the exit function for MUI_WELCOME to work with the checkbox, but that's besides the point)
So far, things seem fine, with one caveat: The text with the checkbox does not have the same white background as the rest of the welcome page. Example picture attached.
Do I need to redraw the screen somehow? Is there a way to tell NSIS to use the same background for the checkbox as the rest of the welcome page? Any pointers would be greatly appreciated. I just have never tried to add additional components to an existing MUI page, so maybe I am missing something obvious. Anyway... any help or pointers would be greatly appreciated 🙂