Old 13th April 2006, 14:50   #1
doublep
Junior Member
 
Join Date: Apr 2006
Posts: 2
Changing Button Text

I want to change the text of the Next button on a MUI custom page depending on the radio button the user selects. I've found examples of changing the text for the Next button, but it only seemed to set it on a leave function. Is there any way to do this?
doublep is offline   Reply With Quote
Old 13th April 2006, 15:14   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
Add the notify flag to the radio buttons, then check the state item in the settings section in the leave function for the page (Take a look at \Examples\InstallOptions\testnotify.nsi)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 13th April 2006, 15:41   #3
doublep
Junior Member
 
Join Date: Apr 2006
Posts: 2
I have the Notify flag on now and I am using this to read the state:

!insertmacro MUI_INSTALLOPTIONS_READ $R1 "NewInstall.ini" "Field 2" "State"

After that i am basically saying:
If it's 1 do something....if it's anything else, do something else.

So how do I actually change the text of the Next button once the radio button is selected?
doublep is offline   Reply With Quote
Old 13th April 2006, 15:56   #4
dienjd
Senior Member
 
Join Date: Oct 2005
Posts: 189
You need to check the state of the [Settings] entry, to see which item notified that it was clicked on:
code:

!insertmacro MUI_INSTALLOPTIONS_READ $R1 "NewInstall.ini" "Settings" "State"
StrCmp $R1 2 changenexttext
Abort

changenexttext:
GetDlgItem $MUI_TEMP1 $HWNDPARENT 0001
SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:foo"
Abort


The file Anders pointed to should have everything you need.
dienjd 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