Old 11th April 2013, 16:42   #1
epileg
Junior Member
 
Join Date: Apr 2013
Posts: 2
enable/disable "next" button on "Choose Components" page

Hello,

Using MUI2, on "Choose Components" page, if the user uncheck everything, "next" button is disabled.
But if the user press "back" and "next", the next button is enabled even if everything is unchecked.

I've added:

code:
...
!define MUI_PAGE_COMPONENTS_SHOW SetNextButton
...
!insertmacro MUI_PAGE_COMPONENTS
...
Function SetNextButton
.onSelChange
FunctionEnd
...



But this break the building process

Any comment will be welcome.

I'm a newbie on NSIS
epileg is offline   Reply With Quote
Old 11th April 2013, 18:02   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,295
Edit:

Quote:
!include MUI.nsh
!insertmacro MUI_PAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SetNextButton
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE English

Function .onSelChange
MessageBox mb_ok "disable next button here if required"
FunctionEnd

Function SetNextButton
Call .onSelChange
FunctionEnd

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 11th April 2013, 18:15   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Are you trying to call .onSelChange? You need to use Call.

Stu
Afrow UK is offline   Reply With Quote
Old 11th April 2013, 18:45   #4
epileg
Junior Member
 
Join Date: Apr 2013
Posts: 2
Anders, your code worked as a charm!

Many many thanks!
epileg is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump