Hi,
how can I disable Cancel/Back buttons on particular page in MUI if I can?
Thanks!
MUI: how to disable Cancel/Back on a page given
6 posts
You can disable the cancel and/or back buttons on the Welcome or Finish page by using:
Remember to write "1" to Settings>ioSpecial.ini in the Welcome page's Leave function too (to re-enable the buttons). Else you might find the buttons are disabled on the Finish page too!
For any other pages, this is not possible as the Welcome and Finish pages are the only MUI pages that use InstallOptions.
-Stu
These should be called on the Welcome/Finish page Pre functions.!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "BackEnable" "0"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "CancelEnable" "0"
Remember to write "1" to Settings>ioSpecial.ini in the Welcome page's Leave function too (to re-enable the buttons). Else you might find the buttons are disabled on the Finish page too!
For any other pages, this is not possible as the Welcome and Finish pages are the only MUI pages that use InstallOptions.
-Stu
should be possible on other pages aswell using the MUI_PAGE_CUSTOMFUNCTION_PRE or
MUI_PAGE_CUSTOMFUNCTION_SHOW defines and using EnableWindow on the button
(didnt test this)
MUI_PAGE_CUSTOMFUNCTION_SHOW defines and using EnableWindow on the button
(didnt test this)
Thanks, I will try to use EnableWindow as well.
Originally posted by AndersIt works! The was only one problem that I didn't know ids for Cancel and Back and determined them after some experiments. So final pre-function for pages that needs to be back/cancel disabled is
should be possible on other pages aswell using the MUI_PAGE_CUSTOMFUNCTION_PRE or
MUI_PAGE_CUSTOMFUNCTION_SHOW defines and using EnableWindow on the button
(didnt test this)
Function DisableBackCancel
GetDlgItem $DlgItem $HWNDPARENT 2 ; Cancel button
EnableWindow $DlgItem 0
GetDlgItem $DlgItem $HWNDPARENT 3 ; Back button
EnableWindow $DlgItem 0
FunctionEnd
Just for the archive (if someone like me gets into this thread by using the search function):
I found out that you actually have to use
Kind regards,
Heiko
I found out that you actually have to use
(the Setting is called BackEnabled ...)
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "BackEnabled" "0"
Kind regards,
Heiko