Archive: Disabling Controls invalidates Keyboard Shortcuts


Disabling Controls invalidates Keyboard Shortcuts
  Hi all,

i am experiencing a little problem, when disabling controls. E.g. when i disable the directory choice (because it is an update and you have to install in the same directory) with

EnableWindow $mui.DirectoryPage.Directory 0

i can not use "ALT+N" to jump to the next dialog. I also experience this on custom dialogs where i disable the Next button until some condition is met, i can not use the keyboard shortcut ALT+B to navigate backwards.

Generally this seems to happen whenever i disable a control using "EnableWindow" i cannot navigate with keyboard shortcuts anymore.

Has anyone come across similar "problems", or maybe a solution?

Thanks
x


I don't know if this is a bug in nsis or windows, but the dialog manager keyboard shortcuts stop working if you disable the window that has keyboard focus.

You can work around it with this hack:


define MUI_PAGE_CUSTOMFUNCTION_SHOW dirShow

>!insertmacro MUI_PAGE_DIRECTORY
>....
Function dirShow
EnableWindow $mui
.DirectoryPage.Directory 0
EnableWindow $mui.DirectoryPage.BrowseButton 0
>${NSD_SetFocus} $HWNDPARENT
FunctionEnd
>

works just fine, Thanks!