My Inno setup installer consist only on 2 custom pages. in the first custom page show show "Abort" button and "Agree and Install" button in the second custom page I want to replace the "Abort" button with "Decline" button, just to change the caption of the button ! I dont know how to adress the page ID of the first and the second page so i cant make it happen.
I have seen how to create custom pages and add them to the wizard in the InitializeWizard procedure.
My problem is that when I create a custom page the default page for install location selection does not appear any more.
What options do I have to keep the default page(install location selection) and also add a my new custom page?
Code:
--------- here are my pages - -----------
procedure CreateTheWizardPages;
var
Page: TWizardPage;
Title: TNewStaticText;
Desc: TRichEditViewer;
CB_border: TPanel;
HPCB: TCheckBox;
HP_Lable:TRichEditViewer;
DSCB: TCheckBox;
DS_Lable:TRichEditViewer;
Footer: TRichEditViewer;
LinkTerms, LinkPP: TNewStaticText;
DeclineButton: TNewButton;
checkx: integer;
begin
Page := CreateCustomPage(
wpWelcome,
ExpandConstant('{cm:MainOfferPageCaption}'),
ExpandConstant('{cm:MainOfferPageDescription}'));
Page.Surface.Notebook.SetBounds(10, 70, ScaleX(WizardForm.Width), ScaleY(500));
{ Title }
Title := TNewStaticText.Create(Page);
Title.Parent := Page.Surface;
Title.Left := ScaleX(0);
Title.Top := ScaleY(0);
Title.Width := ScaleX(200);
Title.Height := ScaleY(30);
Title.Color := -16777186;
Title.Font.Name := 'Verdana';
Title.Font.Style := [fsBold];
Title.Caption := 'Wise Convert app';
Title.Font.size := 12;
Title.TabOrder := 1;
Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TComboBox and others');
{ Title }
Title := TNewStaticText.Create(Page);
Title.Parent := Page.Surface;
Title.Left := ScaleX(0);
Title.Top := ScaleY(0);
Title.Width := ScaleX(200);
Title.Height := ScaleY(30);
Title.Color := -16777186;
Title.Font.Name := 'Verdana';
Title.Font.Style := [fsBold];
Title.Caption := 'Wise Convert app';
Title.Font.size := 18;
Title.TabOrder := 1;
end;
------- here i change the buttons caption ----------
procedure CreateAgreeButton(ParentForm: TSetupForm; nextButton: TNewButton);
var
AgreeButton: TNewButton;
begin
WizardForm.NextButton.Caption := '&Agree and Install';
end;
procedure CreateCancelButton(ParentForm: TSetupForm; CancelButton: TNewButton);
begin
WizardForm.CancelButton.Caption := '&Abort';
WizardForm.backButton.Visible := false;
end;