I would like to disable or hide one of the component choices at run-time. I have created a custom wizard page with two radio buttons. If the first radio button is selected, I would like one of the components (CustomInstall) to not appear, or at least be disabled.
Of course, the custom page appears prior to the Components page.
I have tried to do this with a Check: parameter, but it appears that the [Components] section is evaluated at startup, and not when the page is displayed.
So my next thought was to add some code to my CurPageChanged() so that I could remove or disable the item from the CheckListBox (which I think is called ComopnentsList), but I can't find any documentation on TNewCheckListBox.
Does anyone know more about this class? Will what I am thinking work?
Here's what I ended up doing:
if CurPageID=wpSelectComponents then
begin
if ExtraOptionAvailable() then
begin
Wizardform.ComponentsList.Checked[6] := true;
Wizardform.ComponentsList.ItemEnabled[6] := true;
end else begin
Wizardform.ComponentsList.Checked[6] := false;
Wizardform.ComponentsList.ItemEnabled[6] := false;
end;
end;
Searching the Inno Setup newsgroups at http://www.jrsoftware.org/newsgroups.php was very helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With