Skip to content
⌘ NSIS Forum Archive

Use SectionSetFlags in custom functions

2 posts

Konrad#

Use SectionSetFlags in custom functions

When I register the function onExitComponents via the Modern UI define MUI_CUSTOMFUNCTION_COMPONENTS_LEAVE I cannot use SectionSetFlags and Abort in this code. The dialog will not be refreshed. Only if I press Back and then Next it will be displayed correctly. The Code is:

SectionGetFlags ${Sec2} $0
IntOp $0 $0 | ${SF_EXPAND}
SectionSetFlags ${Sec2} $0
Abort 
Instead of expanding Section2 it just deselects Section2 and all subsections. If I then press back and next it is displayed correctly expanded and selected as before.

Does SetSelectionFlags only work in .onSelChange and .onInit? Or is it just a bug?
kichik#
You can't set SF_EXPAND while the components page is shown. Please add this to the feature requests page in SourceForge (http://sourceforge.net/tracker/?grou...49&atid=373088).