This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: how to enable/ disable radio buttons at runtime?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2009
10:50 AM
how to enable/ disable radio buttons at runtime?
Hi,
Can anybody send me code to enable or disable radio buttons based on the check box selection?
if i select checkbox then radio buttons should enable otherewise it should not..
Project type: Installscript MSI
Can anybody send me code to enable or disable radio buttons based on the check box selection?
if i select checkbox then radio buttons should enable otherewise it should not..
Project type: Installscript MSI
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2009
05:13 AM
Use ShowWindow() to show\hide controls at run-time.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2009
07:31 AM
Hi,
Thanks for your replay, curently i am using that for hiding, but i want to disable not hide
Thanks for your replay, curently i am using that for hiding, but i want to disable not hide
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 25, 2010
06:42 AM
I have the same question.
Can anybody give us some help?
Can anybody give us some help?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 26, 2010
12:36 AM
Get handle for dialog and RadioButton. Use EnableWindow() for enabling\disabling the control.
hwndDlg = CmdGetHwndDlg ( szDialogName );
hWndRadBtn = GetDlgItem( IntToHex(hwndDlg),nIDRadBtn);
EnableWindow( hWndRadBtn , FALSE);
IntToHex function:
function HWND IntToHex(value)
STRING sResult;
NUMBER h1, h2;
HWND handle ;
begin
sResult = "";
LOOP:
if ( value <= 16 ) then
sResult = HexEquivalent(value) + sResult;
while (StrLength(sResult)<8)
sResult = "0" + sResult;
endwhile;
sResult = "0x" + sResult;
StrToNumHex(handle,sResult);
return handle;
else
h1 = value/16;
h2 = value-(h1*16);
sResult = HexEquivalent(h2) + sResult;
value = value/16;
goto LOOP;
endif;
end;
function STRING HexEquivalent(value)
STRING szVal;
begin
switch (value)
case 0: szVal = "0";
case 1: szVal = "1";
case 2: szVal = "2";
case 3: szVal = "3";
case 4: szVal = "4";
case 5: szVal = "5";
case 6: szVal = "6";
case 7: szVal = "7";
case 8: szVal = "8";
case 9: szVal = "9";
case 10: szVal = "a";
case 11: szVal = "b";
case 12: szVal = "c";
case 13: szVal = "d";
case 14: szVal = "e";
case 15: szVal = "f";
default: szVal = "-";
endswitch;
return szVal;
end;
Hope it helps.
hwndDlg = CmdGetHwndDlg ( szDialogName );
hWndRadBtn = GetDlgItem( IntToHex(hwndDlg),nIDRadBtn);
EnableWindow( hWndRadBtn , FALSE);
IntToHex function:
function HWND IntToHex(value)
STRING sResult;
NUMBER h1, h2;
HWND handle ;
begin
sResult = "";
LOOP:
if ( value <= 16 ) then
sResult = HexEquivalent(value) + sResult;
while (StrLength(sResult)<8)
sResult = "0" + sResult;
endwhile;
sResult = "0x" + sResult;
StrToNumHex(handle,sResult);
return handle;
else
h1 = value/16;
h2 = value-(h1*16);
sResult = HexEquivalent(h2) + sResult;
value = value/16;
goto LOOP;
endif;
end;
function STRING HexEquivalent(value)
STRING szVal;
begin
switch (value)
case 0: szVal = "0";
case 1: szVal = "1";
case 2: szVal = "2";
case 3: szVal = "3";
case 4: szVal = "4";
case 5: szVal = "5";
case 6: szVal = "6";
case 7: szVal = "7";
case 8: szVal = "8";
case 9: szVal = "9";
case 10: szVal = "a";
case 11: szVal = "b";
case 12: szVal = "c";
case 13: szVal = "d";
case 14: szVal = "e";
case 15: szVal = "f";
default: szVal = "-";
endswitch;
return szVal;
end;
Hope it helps.
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 20, 2010
12:32 AM
Thanks for help.
I wrote some scripts and fix the problem.
I wrote some scripts and fix the problem.
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 20, 2010
05:59 AM
I use below line in my script to disable the radio button;
_WinSubEnableControl (hwndDlg, 1301, 0);
1301 - radio button identifier
0 - for disable
_WinSubEnableControl (hwndDlg, 1301, 0);
1301 - radio button identifier
0 - for disable