I’m using Check parameter in components section to check if a certain radio button was checked by user.
My predicate is called before custom page is shown to user and I always get default values returned.
How do I get user input from custom page to affect final components selection?
[Components]
Name: common; Description: Common files; Types: server client custom; Flags: fixed
Name: client; Description: Client; Types: client; Check: IsClient
Name: server; Description: Server; Types: server
[Code]
var ClientButton: TNewRadioButton;
procedure InitializeWizard;
var
CustomPage: TWizardPage;
begin
CustomPage := CreateCustomPage(wpWelcome, 'Installation type', '');
{ CreateRadioButton function is defined elsewhere }
ClientButton := CreateRadioButton(CustomPage, 16, 'Client', '');
end;
function IsClient: Boolean;
begin
Log('IsClient() called');
if Assigned(ClientButton) then
Result := ClientButton.Checked
else
Result := True;
end;
The following script makes two radio buttons on a custom page and based on their selection, chooses the installation type from the combo box (on components selection page). This selection happens only when you’re leaving that custom page, so a selection change, you make in that combo box will remain, unless you visit that custom page again: