scaistar
28th August 2005 16:49 UTC
RadioButton unselectable...
Hi,
here me with my stupid problems... :-(
I have a subsection with 2 section COM1 & COM2
User must select only 1 or 2.
I have use radiobutton but if i click COM1 or COM2... making mismatch..
after i can't DESELECT IT.
This are the lines. PLease HELP ME
Thanks
SubSection /e $(nce) Secnce
LangString nce ${LANG_ITALIAN} "NCE Emucam"
LangString nce ${LANG_ENGLISH} "NCE Emucam"
Section /o "=> COM1" com1
SetOutPath "$INSTDIR"
SetOverwrite on
File nce\ncemucam.dll
File nce\1\ncemucam.ini
SectionEnd
Section /o "=> COM2" com2
SetOutPath "$INSTDIR"
SetOverwrite on
File nce\ncemucam.dll
File nce\2\ncemucam.ini
SectionEnd
SubSectionend
Function .onSelChange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${com1}
!insertmacro RadioButton ${com2}
!insertmacro EndRadioButtons
FunctionEnd
Afrow UK
28th August 2005 21:13 UTC
Did you initialise $1 in .onInit?
-Stu
scaistar
29th August 2005 07:44 UTC
Hi have only this..
;Installer Functions
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
How can do it?
THanks for your help.
I'm real beginner.. :-(
glory_man
29th August 2005 13:48 UTC
Add this line in .onInit:
StrCpy $1 ${com1}
And remove optional switch (/o) for COM1 section:
Section "=> COM1" com1
scaistar
29th August 2005 15:27 UTC
I have already tested this
(from EXAMPLE
StrCpy $1 ${g1o1} ; Group 1 - Option 1 is selected by default)
but the result is the same: CAN SWITCH from COM1 and COM2 but cannot UNSELECT BOTH if Select it making error.
I want to DESELECT SUBSECTION (for example if i remember AFTER that have no COM port but only USB port)
Now "SubSection /e $(nce)" is in GRAY WITH FLAG and cannot deselect :-(
kichik
30th August 2005 18:23 UTC
The RadioButton macro doesn't do that. It doesn't allow the user to select no section at all, but only one section, no more, no less. There were some threads in the forum with possible solutions. I couldn't find them with a quick search, maybe you'd have more luck. You might want to search the Wiki too.
deguix
30th August 2005 19:51 UTC
Maybe this will help (I'm not sure):
http://forums.winamp.com/showthread....ge#post1288487
glory_man
31st August 2005 10:14 UTC
See here. I think you have special case for 2 sections.