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: Checkbox help?
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
Jun 16, 2011
10:13 AM
Checkbox help?
I have a dialog with several checkboxes on it. I can set the initial state of the checkboxes like I want - either checked or unchecked.
What I also want to do is to set the state of some of the checkboxes when another is clicked at runtime. So for example, the state of checkbox B is dependent on whether checkbox A is checked or not.
So, when the user clicks checkbox A to check it, I want to uncheck checkbox B.
Can someone explain how I can do that?
Thanks!
What I also want to do is to set the state of some of the checkboxes when another is clicked at runtime. So for example, the state of checkbox B is dependent on whether checkbox A is checked or not.
So, when the user clicks checkbox A to check it, I want to uncheck checkbox B.
Can someone explain how I can do that?
Thanks!
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 07, 2011
05:24 AM
here's a very simple example, though not complete but you can see the key logic to control the checkbox behavior...
function SampleDlg()
//please define some variable by yourself....
#define CHECKBOX_A 123 // ID Of checkbox a
#define CHECKBOX_B 123 // ID Of checkbox b
begin
nResult = EzDefineDialog( szDialogName, "", "", DIALOG_ID);
// Display the dialog box and return the next dialog box event.
nCmdValue = WaitOnDialog(szDialogName);
switch (nCmdValue)
case CHECKBOX_A:
if (CtrlGetState( szDialogName, CHECKBOX_A)= BUTTON_CHECKED) then
//add code to uncheck CHECKBOX_B;
endif;
case XXX:
....
endswitch;
end;
function SampleDlg()
//please define some variable by yourself....
#define CHECKBOX_A 123 // ID Of checkbox a
#define CHECKBOX_B 123 // ID Of checkbox b
begin
nResult = EzDefineDialog( szDialogName, "", "", DIALOG_ID);
// Display the dialog box and return the next dialog box event.
nCmdValue = WaitOnDialog(szDialogName);
switch (nCmdValue)
case CHECKBOX_A:
if (CtrlGetState( szDialogName, CHECKBOX_A)= BUTTON_CHECKED) then
//add code to uncheck CHECKBOX_B;
endif;
case XXX:
....
endswitch;
end;
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)