Skip to content
⌘ NSIS Forum Archive

Writing Text to MUI Dialog Control

2 posts

sb100#

Writing Text to MUI Dialog Control

Hello,
I have a requirement to preset the value for a text control, when the parent custom dialog box is displayed.

Here's the code for the leave function, associated with the dialog box:-

Function LeaveDialogue
; Write the value to text box
!insertmacro MUI_INSTALLOPTIONS_WRITE "${DIALOGUE_INI}" "Field 1" "State" "Hello After"

; Read the text box value
!insertmacro MUI_INSTALLOPTIONS_READ $0 "${DIALOGUE_INI}" "Field 1" "State"

; Display the text box value, recently read
MessageBox MB_OK $0

FunctionEnd

When the value is read, it is the new value ("Hello After"), but the text box doesn't refresh the value on the screen.

Any solutions?