Skip to content
⌘ NSIS Forum Archive

Cancel button in nsDialogs

6 posts

rthawley#

Cancel button in nsDialogs

How do I tell if the Cancel button has been pressed in a nsDialogs dialogbox?
Afrow UK#
nsDialogs doesn't appear to have a built in handler so the best thing I can think of is to set a variable to 1 before ::Show and to 0 in the custom page's leave callback function (and in the previous page's pre callback function if there is a previous page). Then check the variable value in your abort callback function (set using MUI_CUSTOMFUNCTION_ABORT) to determine whether or not the user cancelled while on your custom page. Your other option is to write a plug-in which grabs the value of extra_parameters->abort (set to 1 after Cancel has been pressed).

Stu
MSG#
Originally Posted by T.Slappy View Post
Maybe it will be added in next release.
Why, are you planning to add it?
Anders#
You should really only make changes outside $pluginsdir on the instfiles page so IMHO catching cancel seems wrong...
T.Slappy#
Originally Posted by MSG View Post
Why, are you planning to add it?
Yes that's the plan, but there is too much items on my To-Do list 🙁