cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pgarvey
Level 4

Must choose at least one Feature.

Hi -

I have a pretty simple scenario that I was hoping somebody could help me with. I'm using InstallShield 11.5 multiplatform.

Basically, I have two features available for selection within the Feature Dialog window. By default, InstallShield will allow users to select one, both or none of the features.

I would like to be able to stop users from being able to deselect both features, i.e. force them to select one or both features. As I don't care which feature is chosen by the user, I can't set a feature as being "Required".

I have to assume that there is a way of doing this, but for the life of me I can't figure it out. Can I check when a feature has been selected/deselected from within the Feature dialog window and based upon the result disable the 'Next' button? If so, how do I do that? If not, how else would I get this to work?

Any help would be greatly appreciated...

Thanks,
Paul
Labels (1)
0 Kudos

(2) Replies
Barry_Lawson
Level 3

Add the following to the Standard Feature Panel Swing code
public void queryExitFeature(com.installshield.event.ui.ISDialogQueryContext context)
{
String F1act = context.getServices().resolveString("$P(feature1.active)");
String F2act = context.getServices().resolveString("$P(feature2.active)");
if (F1act.equals("false") && F2act.equals("false")){
context.getWizardUI().displayUserMessage(
context.getServices().resolveString(
context.getISFrame().getTitle()),
context.getServices().resolveString(
"Atleast one Feature must be selected"),
UserInputRequest.MESSAGE);
//context.logEvent(this, Log.ERROR, "Feature Test");
context.setReturnValue(false);
}
}
0 Kudos
pgarvey
Level 4

That worked perfectly!! Thank you very much Barry!!
0 Kudos