Added Radio buttons
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7290 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
a2641b17d8
commit
6856994af8
1 changed files with 44 additions and 0 deletions
|
@ -18,6 +18,7 @@ Page custom nsDialogsPage
|
||||||
Page custom LBPage
|
Page custom LBPage
|
||||||
Page custom RangesPage
|
Page custom RangesPage
|
||||||
Page custom NotifyPage
|
Page custom NotifyPage
|
||||||
|
Page custom RadioPage RadioLeave
|
||||||
!pragma warning disable 8000 ; "Page instfiles not used, no sections will be executed!"
|
!pragma warning disable 8000 ; "Page instfiles not used, no sections will be executed!"
|
||||||
|
|
||||||
Var BUTTON
|
Var BUTTON
|
||||||
|
@ -251,5 +252,48 @@ ${If} $2 = ${DTN_DATETIMECHANGE}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
||||||
|
Function RadioPage
|
||||||
|
!insertmacro BeginControlsTestPage "Radio buttons"
|
||||||
|
|
||||||
|
; Group 1
|
||||||
|
${NSD_CreateFirstRadioButton} 4u 0 40% 6% "NPR"
|
||||||
|
Pop $1
|
||||||
|
${NSD_OnClick} $1 onStationChanged
|
||||||
|
${NSD_CreateAdditionalRadioButton} 4u 12% 40% 6% "BBC"
|
||||||
|
Pop $2
|
||||||
|
${NSD_OnClick} $2 onStationChanged
|
||||||
|
${NSD_CreateLabel} 4u 30u 80% 12u ""
|
||||||
|
Pop $3
|
||||||
|
|
||||||
|
; Group 2
|
||||||
|
${NSD_CreateFirstRadioButton} 4u 50u 50% 12u "FM"
|
||||||
|
Pop $4
|
||||||
|
${NSD_CreateAdditionalRadioButton} 4u 64u 50% 12u "AM"
|
||||||
|
Pop $5
|
||||||
|
|
||||||
|
SendMessage $4 ${BM_CLICK} "" "" ; Must select a default
|
||||||
|
SendMessage $2 ${BM_CLICK} "" "" ; Must select a default
|
||||||
|
nsDialogs::Show
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
Function onStationChanged
|
||||||
|
Pop $0
|
||||||
|
${NSD_GetText} $0 $0
|
||||||
|
${If} $0 == "NPR"
|
||||||
|
${NSD_SetText} $3 "America, f*(# yeah!"
|
||||||
|
${Else}
|
||||||
|
${NSD_SetText} $3 "Keep Calm and Carry On"
|
||||||
|
${EndIf}
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
Function RadioLeave
|
||||||
|
${NSD_GetChecked} $5 $0
|
||||||
|
${If} $0 <> 0
|
||||||
|
MessageBox MB_YESNO "Are you sure you want to keep living in the past?" IDYES +2
|
||||||
|
Abort
|
||||||
|
${EndIf}
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
Section
|
Section
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue